public class JAASLoginService extends AbstractLifeCycle implements LoginService
AbstractLifeCycle.AbstractLifeCycleListener
LifeCycle.Listener
Modifier and Type | Field and Description |
---|---|
protected String |
_callbackHandlerClass |
protected JAASUserPrincipal |
_defaultUser |
protected IdentityService |
_identityService |
protected String |
_loginModuleName |
protected String |
_realmName |
protected String[] |
_roleClassNames |
static String |
DEFAULT_ROLE_CLASS_NAME |
static String[] |
DEFAULT_ROLE_CLASS_NAMES |
Constructor and Description |
---|
JAASLoginService()
Constructor.
|
JAASLoginService(String name)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
doStart() |
IdentityService |
getIdentityService()
Get the identityService.
|
String |
getName()
Get the name of the realm.
|
String[] |
getRoleClassNames() |
UserIdentity |
login(String username,
Object credentials,
ServletRequest request) |
void |
logout(UserIdentity user) |
void |
setCallbackHandlerClass(String classname) |
void |
setIdentityService(IdentityService identityService)
Set the identityService.
|
void |
setLoginModuleName(String name)
Set the name to use to index into the config
file of LoginModules.
|
void |
setName(String name)
Set the name of the realm
|
void |
setRoleClassNames(String[] classnames) |
boolean |
validate(UserIdentity user) |
addLifeCycleListener, doStop, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, setStopTimeout, start, stop
public static final String DEFAULT_ROLE_CLASS_NAME
public static final String[] DEFAULT_ROLE_CLASS_NAMES
protected String[] _roleClassNames
protected String _callbackHandlerClass
protected String _realmName
protected String _loginModuleName
protected JAASUserPrincipal _defaultUser
protected IdentityService _identityService
public JAASLoginService()
public JAASLoginService(String name)
name
- the name of the realmpublic String getName()
getName
in interface LoginService
public void setName(String name)
name
- a String
valuepublic IdentityService getIdentityService()
getIdentityService
in interface LoginService
public void setIdentityService(IdentityService identityService)
setIdentityService
in interface LoginService
identityService
- the identityService to setpublic void setLoginModuleName(String name)
name
- a String
valuepublic void setCallbackHandlerClass(String classname)
public void setRoleClassNames(String[] classnames)
public String[] getRoleClassNames()
protected void doStart() throws Exception
doStart
in class AbstractLifeCycle
Exception
AbstractLifeCycle.doStart()
public UserIdentity login(String username, Object credentials, ServletRequest request)
login
in interface LoginService
public boolean validate(UserIdentity user)
validate
in interface LoginService
public void logout(UserIdentity user)
logout
in interface LoginService
Copyright © 1995-2016 Webtide. All Rights Reserved.