Method Summary |
|
public 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). |
protected 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. |
public String | getDataSourceName() Return the name of the JNDI JDBC DataSource. |
public boolean | getLocalDataSource() Return if the datasource will be looked up in the webapp JNDI Context. |
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 String | getPassword(Connection dbConnection, 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. |
protected ArrayList | getRoles(String username) Return the roles associated with the given user name. |
protected ArrayList<String> | getRoles(Connection dbConnection, String username) |
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 the specified database connection. |
public void | setDataSourceName(String dataSourceName) Set the name of the JNDI JDBC DataSource. |
public void | setLocalDataSource(boolean localDataSource) Set to true to cause the datasource to be looked up in the webapp JNDI
Context. |
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. |