| Modifier and Type | Field and Description |
|---|---|
| private volatile boolean | connectionSuccess
Last connection attempt. |
| protected String | dataSourceName
The name of the JNDI JDBC DataSource |
| protected boolean | localDataSource
Context local datasource. |
| private String | preparedCredentials
The generated string for the credentials PreparedStatement |
| private String | preparedRoles
The generated string for the roles PreparedStatement |
| protected String | roleNameCol
The column in the user role table that names a role |
| protected String | userCredCol
The column in the user table that holds the user's credentials |
| protected String | userNameCol
The column in the user table that holds the user's name |
| protected String | userRoleTable
The table that holds the relation between user's and roles |
| protected String | userTable
The table that holds user data. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Principal | authenticate(String
Username of the Principal to look up username, String Password or other credentials to use in
authenticating this username credentials)Overrides org. Implements org. Try to authenticate using the specified username and credentials. |
| protected Principal | Returns: the associated principal, ornull if there is none.The database connection to be used dbConnection, String Username of the Principal to look up username, String Password or other credentials to use in authenticating this username credentials)Return the Principal associated with the specified username and credentials, if there is one; otherwise return
|
| protected void | |
| public String | |
| public boolean | |
| protected String | Returns: the password associated with the given principal's user name.The user name username)Implements abstract org. Get the password for the specified user. |
| protected String | Returns: the password for the specified userThe database connection to be used dbConnection, String Username for which password should be retrieved username)Return the password associated with the given principal's user name. |
| protected Principal | Returns: the principal objectthe user name username)Implements abstract org. Return the Principal associated with the given user name. |
| public String | |
| protected ArrayList | |
| protected ArrayList | Returns: an array list of the role namesThe database connection to be used dbConnection, String User name for which roles should be retrieved username)Return the roles associated with the given user name. |
| public String | |
| public String | |
| public String | |
| public String | |
| public boolean | isAvailable()
Overrides default org. Return the availability of the realm for authentication. |
| private boolean | |
| protected Connection | |
| public void | setDataSourceName(String
the name of the JNDI JDBC DataSource dataSourceName)Set the name of the JNDI JDBC DataSource. |
| public void | setLocalDataSource(boolean
the new flag value localDataSource)Set to true to cause the datasource to be looked up in the webapp JNDI Context. |
| public void | setRoleNameCol(String
The column name roleNameCol)Set the column in the user role table that names a role. |
| public void | setUserCredCol(String
The column name userCredCol)Set the column in the user table that holds the user's credentials. |
| public void | setUserNameCol(String
The column name userNameCol)Set the column in the user table that holds the user's name. |
| public void | setUserRoleTable(String
The table name userRoleTable)Set the table that holds the relation between user's and roles. |
| public void | |
| protected void | startInternal()
Overrides org. Prepare for the beginning of active use of the public methods of this component and implement the requirements of
|
| connectionSuccess | back to summary |
|---|---|
| private volatile boolean connectionSuccess Last connection attempt. | |
| dataSourceName | back to summary |
|---|---|
| protected String dataSourceName The name of the JNDI JDBC DataSource | |
| localDataSource | back to summary |
|---|---|
| protected boolean localDataSource Context local datasource. | |
| preparedCredentials | back to summary |
|---|---|
| private String preparedCredentials The generated string for the credentials PreparedStatement | |
| preparedRoles | back to summary |
|---|---|
| private String preparedRoles The generated string for the roles PreparedStatement | |
| roleNameCol | back to summary |
|---|---|
| protected String roleNameCol The column in the user role table that names a role | |
| userCredCol | back to summary |
|---|---|
| protected String userCredCol The column in the user table that holds the user's credentials | |
| userNameCol | back to summary |
|---|---|
| protected String userNameCol The column in the user table that holds the user's name | |
| userRoleTable | back to summary |
|---|---|
| protected String userRoleTable The table that holds the relation between user's and roles | |
| userTable | back to summary |
|---|---|
| protected String userTable The table that holds user data. | |
| DataSourceRealm | back to summary |
|---|---|
| public DataSourceRealm() | |
| authenticate | back to summary |
|---|---|
| public Principal authenticate(String username, String credentials) Overrides org. Implements org. Doc from org. Try to authenticate using the specified username and credentials. If there are any errors with the JDBC connection, executing the query or anything this method returns null (doesn't authenticate). This event is also logged, and the connection will be closed so that a subsequent request will automatically re-open it. | |
| authenticate | back to summary |
|---|---|
| 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
| |
| close | back to summary |
|---|---|
| protected void close(Connection dbConnection) Close the specified database connection.
| |
| getDataSourceName | back to summary |
|---|---|
public String getDataSourceName()
| |
| getLocalDataSource | back to summary |
|---|---|
public boolean getLocalDataSource()
| |
| getPassword | back to summary |
|---|---|
| protected String getPassword(String username) Implements abstract org. Doc from org. Get the password for the specified user. | |
| getPassword | back to summary |
|---|---|
| protected String getPassword(Connection dbConnection, String username) Return the password associated with the given principal's user name.
| |
| getPrincipal | back to summary |
|---|---|
| protected Principal getPrincipal(String username) Implements abstract org. Return the Principal associated with the given user name. | |
| getRoleNameCol | back to summary |
|---|---|
public String getRoleNameCol()
| |
| getRoles | back to summary |
|---|---|
| protected ArrayList Return the roles associated with the given user name. | |
| getRoles | back to summary |
|---|---|
| protected ArrayList Return the roles associated with the given user name.
| |
| getUserCredCol | back to summary |
|---|---|
public String getUserCredCol()
| |
| getUserNameCol | back to summary |
|---|---|
public String getUserNameCol()
| |
| getUserRoleTable | back to summary |
|---|---|
public String getUserRoleTable()
| |
| getUserTable | back to summary |
|---|---|
public String getUserTable()
| |
| isAvailable | back to summary |
|---|---|
| public boolean isAvailable() Overrides default org. Doc from org. Return the availability of the realm for authentication.
| |
| isRoleStoreDefined | back to summary |
|---|---|
| private boolean isRoleStoreDefined() | |
| open | back to summary |
|---|---|
| protected Connection open() Open the specified database connection.
| |
| setDataSourceName | back to summary |
|---|---|
| public void setDataSourceName(String dataSourceName) Set the name of the JNDI JDBC DataSource.
| |
| setLocalDataSource | back to summary |
|---|---|
| public void setLocalDataSource(boolean localDataSource) Set to true to cause the datasource to be looked up in the webapp JNDI Context.
| |
| setRoleNameCol | back to summary |
|---|---|
| public void setRoleNameCol(String roleNameCol) Set the column in the user role table that names a role.
| |
| setUserCredCol | back to summary |
|---|---|
| public void setUserCredCol(String userCredCol) Set the column in the user table that holds the user's credentials.
| |
| setUserNameCol | back to summary |
|---|---|
| public void setUserNameCol(String userNameCol) Set the column in the user table that holds the user's name.
| |
| setUserRoleTable | back to summary |
|---|---|
| public void setUserRoleTable(String userRoleTable) Set the table that holds the relation between user's and roles.
| |
| setUserTable | back to summary |
|---|---|
| public void setUserTable(String userTable) Set the table that holds user data.
| |
| startInternal | back to summary |
|---|---|
| protected void startInternal() throws LifecycleException Overrides org. Doc from org. Prepare for the beginning of active use of the public methods of this component and implement the requirements of
| |