Method Summary |
|
public synchronized Principal | authenticate(String username, String credentials) Return the Principal associated with the specified username and
credentials, if there is one; otherwise return null .
If there are any errors with the JDBC connection, executing
the query or anything we return null (don't authenticate). |
public synchronized Principal | authenticate(Connection dbConnection, String username, String credentials) Return the Principal associated with the specified username and
credentials, if there is one; otherwise return null . |
protected void | close(Connection dbConnection) Close the specified database connection. |
protected PreparedStatement | credentials(Connection dbConnection, String username) Return a PreparedStatement configured to perform the SELECT required
to retrieve user credentials for the specified username. |
public String | getConnectionName() Return the username to use to connect to the database. |
public String | getConnectionPassword() Return the password to use to connect to the database. |
public String | getConnectionURL() Return the URL to use to connect to the database. |
public String | getDriverName() Return the JDBC driver that will be used. |
protected String | getName() Return a short name for this Realm implementation. |
protected String | getPassword(String username) Return the password associated with the given principal's user name. |
protected Principal | getPrincipal(String username) Return the Principal associated with the given user name. |
public String | getRoleNameCol() Return the column in the user role table that names a role. |
public String | getUserCredCol() Return the column in the user table that holds the user's credentials. |
public String | getUserNameCol() Return the column in the user table that holds the user's name. |
public String | getUserRoleTable() Return the table that holds the relation between user's and roles. |
public String | getUserTable() Return the table that holds user data.. |
protected Connection | open() Open (if necessary) and return a database connection for use by
this Realm. |
protected void | release(Connection dbConnection) Release our use of this connection so that it can be recycled. |
protected PreparedStatement | roles(Connection dbConnection, String username) Return a PreparedStatement configured to perform the SELECT required
to retrieve user roles for the specified username. |
public void | setConnectionName(String connectionName) Set the username to use to connect to the database. |
public void | setConnectionPassword(String connectionPassword) Set the password to use to connect to the database. |
public void | setConnectionURL(String connectionURL) Set the URL to use to connect to the database. |
public void | setDriverName(String driverName) Set the JDBC driver that will be used. |
public void | setRoleNameCol(String roleNameCol) Set the column in the user role table that names a role. |
public void | setUserCredCol(String userCredCol) Set the column in the user table that holds the user's credentials. |
public void | setUserNameCol(String userNameCol) Set the column in the user table that holds the user's name. |
public void | setUserRoleTable(String userRoleTable) Set the table that holds the relation between user's and roles. |
public void | setUserTable(String userTable) Set the table that holds user data. |
public void | start() Prepare for active use of the public methods of this Component. |
public void | stop() Gracefully shut down active use of the public methods of this Component. |