Wombat::Realm::DBIRealm - internal realm base clas
Implementation of Wombat::Realm that works with any DBI supported database.
Construct and return a Wombat::Realm::RealmBase instance, initializing fields appropriately. If subclasses override the constructor, they must be sure to call
$self->SUPER::new();
Set the username to use to connect to the database.
Parameters:
the database username
Set the password to use to connect to the database.
the database password
Set the URL to use to connect to the database. The URL is the part of the DBI data source after the driver name. In this example
DBI:mysql:hostname=localhost;port=12345;database=hi
the URL is
hostname=localhost;port=12345;database=hi
the database URL
Set the DBI driver to use.
the DBI driver name
Set the column in the user role table that names a role.
the column name
Set the column in the user table that holds the user's credentials.
Set the column in the user table that holds the user's name.
Set the table that holds the relation between users and roles.
the table name
Set the table that holds user data.
Return the Principal associated with the specified username and credentials, if there is one, or undef otherwise.
undef
If there are any errors with the DBI connection, executing the query or anything else, do not authenticate and return undef. This event is also logged, and the connection will be closed so that a subsequent request will automatically re-open it.
Parameters
username of the principal to be looked up
password or other credentials to use in authenticating this username
Close the database connection.
Return a short name for this Realm implementation.
Open the database connection.
Prepare for active use of this Realm, opening the database connection. This method should be called before any of the public methods of the Realm are utilized.
Throws:
if the Realm has already been started
Gracefully terminate active use of this Realm, closing the database connection. Once this method has been called, no public methods of the Realm should be utilized.
if the Realm is not started
DBI, Wombat::Realm::RealmBase
Brian Moseley, bcm@maz.org
To install Wombat, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Wombat
CPAN shell
perl -MCPAN -e shell install Wombat
For more information on module installation, please visit the detailed CPAN module installation guide.