| Modifier and Type | Field and Description |
|---|---|
| private int | |
| private Connection | |
| private String | |
| private long | |
| private String | |
| private String | |
| private String | |
| private String | |
| private String | |
| private String | |
| private String | |
| private String | |
| private String | |
| private String | |
| private String | |
| private String | |
| private String | |
| private String | |
| private String |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | JDBCUserRealm(String
Realm name name, String Filename or url of JDBC connection properties file. config)Constructor. |
| Modifier and Type | Method and Description |
|---|---|
| public Principal | authenticate(String
The username. username, Object The user credentials, normally a String password. credentials, Request The request to be authenticated. Additional
parameters may be extracted or set on this request as needed
for the authentication mechanism (none required for BASIC and
FORM authentication). request)Overrides org. Implements org. |
| public void | |
| public synchronized boolean | Returns: True if the user can act in the role.The user, which must be from this realm user, String roleName)Overrides org. Implements org. |
| protected void | loadConfig()
Overrides org. |
| private void | |
| public void | logout(Principal
A Principal previously returned from this realm user)Overrides org. Implements org. |
| _cacheTime | back to summary |
|---|---|
| private int _cacheTime | |
| _con | back to summary |
|---|---|
| private Connection _con | |
| _jdbcDriver | back to summary |
|---|---|
| private String _jdbcDriver | |
| _lastHashPurge | back to summary |
|---|---|
| private long _lastHashPurge | |
| _password | back to summary |
|---|---|
| private String _password | |
| _roleSql | back to summary |
|---|---|
| private String _roleSql | |
| _roleTable | back to summary |
|---|---|
| private String _roleTable | |
| _roleTableKey | back to summary |
|---|---|
| private String _roleTableKey | |
| _roleTableRoleField | back to summary |
|---|---|
| private String _roleTableRoleField | |
| _url | back to summary |
|---|---|
| private String _url | |
| _userName | back to summary |
|---|---|
| private String _userName | |
| _userRoleTable | back to summary |
|---|---|
| private String _userRoleTable | |
| _userRoleTableRoleKey | back to summary |
|---|---|
| private String _userRoleTableRoleKey | |
| _userRoleTableUserKey | back to summary |
|---|---|
| private String _userRoleTableUserKey | |
| _userSql | back to summary |
|---|---|
| private String _userSql | |
| _userTable | back to summary |
|---|---|
| private String _userTable | |
| _userTableKey | back to summary |
|---|---|
| private String _userTableKey | |
| _userTablePasswordField | back to summary |
|---|---|
| private String _userTablePasswordField | |
| _userTableUserField | back to summary |
|---|---|
| private String _userTableUserField | |
| JDBCUserRealm | back to summary |
|---|---|
| public JDBCUserRealm() Constructor. | |
| JDBCUserRealm | back to summary |
|---|---|
| public JDBCUserRealm(String name) Constructor. | |
| JDBCUserRealm | back to summary |
|---|---|
| public JDBCUserRealm(String name, String config) throws IOException, ClassNotFoundException, InstantiationException, IllegalAccessException Constructor. | |
| authenticate | back to summary |
|---|---|
| public Principal authenticate(String username, Object credentials, Request request) Overrides org. Implements org. Doc from org. Authenticate a users credentials. Implementations of this method may adorn the calling context to assoicate it with the authenticated principal (eg ThreadLocals). If such context associations are made, they should be considered valid until a UserRealm.deAuthenticate(UserPrincipal) call is made for this UserPrincipal.
| |
| connectDatabase | back to summary |
|---|---|
| public void connectDatabase() (re)Connect to database with parameters setup by loadConfig() | |
| isUserInRole | back to summary |
|---|---|
| public synchronized boolean isUserInRole(Principal user, String roleName) Overrides org. Implements org. Check if a user is in a role.
| |
| loadConfig | back to summary |
|---|---|
| protected void loadConfig() throws IOException Overrides org. Load JDBC connection configuration from properties file. | |
| loadUser | back to summary |
|---|---|
| private void loadUser(String username) | |
| logout | back to summary |
|---|---|
| public void logout(Principal user) Overrides org. Implements org. Doc from org. logout a user Principal. Called by authentication mechanisms (eg FORM) that can detect logout.
| |