public class JDBCLoginService extends MappedLoginService
MappedLoginService.Anonymous, MappedLoginService.KnownUser, MappedLoginService.RolePrincipal, MappedLoginService.UserPrincipalAbstractLifeCycle.AbstractLifeCycleListenerLifeCycle.Listener_identityService, _name, _users_listeners, FAILED, RUNNING, STARTED, STARTING, STOPPED, STOPPING| Constructor and Description |
|---|
JDBCLoginService() |
JDBCLoginService(String name) |
JDBCLoginService(String name,
IdentityService identityService,
String config) |
JDBCLoginService(String name,
String config) |
| Modifier and Type | Method and Description |
|---|---|
void |
connectDatabase()
(re)Connect to database with parameters setup by loadConfig()
|
protected void |
doStart() |
String |
getConfig() |
protected UserIdentity |
loadUser(String username) |
protected void |
loadUsers() |
UserIdentity |
login(String username,
Object credentials)
Login a user.
|
void |
setConfig(String config)
Load JDBC connection configuration from properties file.
|
doStop, getIdentityService, getName, getUsers, logout, putUser, putUser, removeUser, setIdentityService, setName, setUsers, toString, validateaddLifeCycleListener, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stoppublic JDBCLoginService()
throws IOException
IOExceptionpublic JDBCLoginService(String name) throws IOException
IOExceptionpublic JDBCLoginService(String name, String config) throws IOException
IOExceptionpublic JDBCLoginService(String name, IdentityService identityService, String config) throws IOException
IOExceptionprotected void doStart()
throws Exception
doStart in class MappedLoginServiceExceptionMappedLoginService.doStart()public String getConfig()
public void setConfig(String config)
config - Filename or url of user properties file.public void connectDatabase()
public UserIdentity login(String username, Object credentials)
LoginServicelogin in interface LoginServicelogin in class MappedLoginServiceusername - The user namecredentials - The users credentialsLoginService.login(java.lang.String, java.lang.Object)protected void loadUsers()
loadUsers in class MappedLoginServiceprotected UserIdentity loadUser(String username)
loadUser in class MappedLoginServiceCopyright © 1995-2015 Mort Bay Consulting. All Rights Reserved.