public class JDBCUserRealm extends HashUserRealm
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>__SSO, _roles| Constructor and Description |
|---|
JDBCUserRealm(String name)
Constructor.
|
JDBCUserRealm(String name,
String config)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Principal |
authenticate(String username,
Object credentials,
HttpRequest request)
Authenticate a users credentials.
|
void |
connectDatabase()
(re)Connect to database with parameters setup by loadConfig()
|
void |
loadConfig(String config)
Load JDBC connection configuration from properties file.
|
void |
logout(Principal user)
logout a user Principal.
|
addUserToRole, clearSingleSignOn, disassociate, dump, getName, getPrincipal, getSingleSignOn, getSSORealm, isUserInRole, load, popRole, pushRole, put, readExternal, reauthenticate, setName, setSingleSignOn, setSSORealm, toString, writeExternalclear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, putAll, remove, size, valuesequals, hashCodepublic JDBCUserRealm(String name)
name - public JDBCUserRealm(String name, String config) throws IOException, ClassNotFoundException, InstantiationException, IllegalAccessException
name - Realm nameconfig - Filename or url of JDBC connection properties file.IOExceptionClassNotFoundExceptionInstantiationExceptionIllegalAccessExceptionpublic void loadConfig(String config) throws IOException
config - Filename or url of user properties file.IOExceptionpublic void logout(Principal user)
UserRealmlogout in interface UserRealmlogout in class HashUserRealmuser - A Principal previously returned from this realmpublic void connectDatabase()
public Principal authenticate(String username, Object credentials, HttpRequest request)
UserRealmauthenticate in interface UserRealmauthenticate in class HashUserRealmusername - The username.credentials - The user credentials, normally a String password.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).Copyright © 2013. All rights reserved.