public abstract class AbstractLoginService extends AbstractLifeCycle implements LoginService
Modifier and Type | Class and Description |
---|---|
static class |
AbstractLoginService.RolePrincipal
RolePrincipal
|
static class |
AbstractLoginService.UserPrincipal
UserPrincipal
|
AbstractLifeCycle.AbstractLifeCycleListener
LifeCycle.Listener
Modifier and Type | Field and Description |
---|---|
protected boolean |
_fullValidate |
protected IdentityService |
_identityService |
protected String |
_name |
FAILED, RUNNING, STARTED, STARTING, STOP_ON_FAILURE, STOPPED, STOPPING
Constructor and Description |
---|
AbstractLoginService() |
Modifier and Type | Method and Description |
---|---|
IdentityService |
getIdentityService()
Get the IdentityService associated with this Login Service.
|
String |
getName() |
boolean |
isFullValidate() |
protected abstract String[] |
loadRoleInfo(AbstractLoginService.UserPrincipal user) |
protected abstract AbstractLoginService.UserPrincipal |
loadUserInfo(String username) |
UserIdentity |
login(String username,
Object credentials,
ServletRequest request)
Login a user.
|
void |
logout(UserIdentity user) |
void |
setFullValidate(boolean fullValidate) |
void |
setIdentityService(IdentityService identityService)
Set the identityService.
|
void |
setName(String name)
Set the name.
|
String |
toString() |
boolean |
validate(UserIdentity user)
Validate a user identity.
|
addLifeCycleListener, doStart, doStop, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, setStopTimeout, start, stop
protected IdentityService _identityService
protected String _name
protected boolean _fullValidate
protected abstract String[] loadRoleInfo(AbstractLoginService.UserPrincipal user)
protected abstract AbstractLoginService.UserPrincipal loadUserInfo(String username)
public String getName()
getName
in interface LoginService
LoginService.getName()
public void setIdentityService(IdentityService identityService)
setIdentityService
in interface LoginService
identityService
- the identityService to setpublic void setName(String name)
name
- the name to setpublic UserIdentity login(String username, Object credentials, ServletRequest request)
LoginService
login
in interface LoginService
username
- The user namecredentials
- The users credentialsrequest
- TODOLoginService.login(java.lang.String, java.lang.Object, javax.servlet.ServletRequest)
public boolean validate(UserIdentity user)
LoginService
LoginService.login(String, Object, ServletRequest)
is still valid.validate
in interface LoginService
user
- The user to validateLoginService.validate(org.eclipse.jetty.server.UserIdentity)
public IdentityService getIdentityService()
LoginService
getIdentityService
in interface LoginService
LoginService.getIdentityService()
public void logout(UserIdentity user)
logout
in interface LoginService
LoginService.logout(org.eclipse.jetty.server.UserIdentity)
public boolean isFullValidate()
public void setFullValidate(boolean fullValidate)
Copyright © 1995–2017 Webtide. All rights reserved.