LoginService
public class JAASLoginService extends org.eclipse.jetty.util.component.AbstractLifeCycle implements LoginService
Modifier and Type | Field | Description |
---|---|---|
protected java.lang.String |
_callbackHandlerClass |
|
protected javax.security.auth.login.Configuration |
_configuration |
|
protected JAASUserPrincipal |
_defaultUser |
|
protected IdentityService |
_identityService |
|
protected java.lang.String |
_loginModuleName |
|
protected java.lang.String |
_realmName |
|
protected java.lang.String[] |
_roleClassNames |
|
static java.lang.String |
DEFAULT_ROLE_CLASS_NAME |
|
static java.lang.String[] |
DEFAULT_ROLE_CLASS_NAMES |
Constructor | Description |
---|---|
JAASLoginService() |
|
JAASLoginService(java.lang.String name) |
Modifier and Type | Method | Description |
---|---|---|
protected void |
doStart() |
|
javax.security.auth.login.Configuration |
getConfiguration() |
|
protected java.lang.String[] |
getGroups(javax.security.auth.Subject subject) |
Get all of the groups for the user.
|
IdentityService |
getIdentityService() |
Get the identityService.
|
java.lang.String |
getName() |
Get the name of the realm.
|
java.lang.String[] |
getRoleClassNames() |
|
org.eclipse.jetty.server.UserIdentity |
login(java.lang.String username,
java.lang.Object credentials,
ServletRequest request) |
|
void |
logout(org.eclipse.jetty.server.UserIdentity user) |
|
void |
setCallbackHandlerClass(java.lang.String classname) |
|
void |
setConfiguration(javax.security.auth.login.Configuration configuration) |
|
void |
setIdentityService(IdentityService identityService) |
Set the identityService.
|
void |
setLoginModuleName(java.lang.String name) |
Set the name to use to index into the config
file of LoginModules.
|
void |
setName(java.lang.String name) |
Set the name of the realm
|
void |
setRoleClassNames(java.lang.String[] classnames) |
|
boolean |
validate(org.eclipse.jetty.server.UserIdentity user) |
public static final java.lang.String DEFAULT_ROLE_CLASS_NAME
public static final java.lang.String[] DEFAULT_ROLE_CLASS_NAMES
protected java.lang.String[] _roleClassNames
protected java.lang.String _callbackHandlerClass
protected java.lang.String _realmName
protected java.lang.String _loginModuleName
protected JAASUserPrincipal _defaultUser
protected IdentityService _identityService
protected javax.security.auth.login.Configuration _configuration
public JAASLoginService()
public JAASLoginService(java.lang.String name)
name
- the name of the realmpublic java.lang.String getName()
getName
in interface LoginService
public void setName(java.lang.String name)
name
- a String
valuepublic javax.security.auth.login.Configuration getConfiguration()
public void setConfiguration(javax.security.auth.login.Configuration configuration)
configuration
- the configuration to setpublic IdentityService getIdentityService()
getIdentityService
in interface LoginService
public void setIdentityService(IdentityService identityService)
setIdentityService
in interface LoginService
identityService
- the identityService to setpublic void setLoginModuleName(java.lang.String name)
name
- a String
valuepublic void setCallbackHandlerClass(java.lang.String classname)
public void setRoleClassNames(java.lang.String[] classnames)
public java.lang.String[] getRoleClassNames()
protected void doStart() throws java.lang.Exception
doStart
in class org.eclipse.jetty.util.component.AbstractLifeCycle
java.lang.Exception
public org.eclipse.jetty.server.UserIdentity login(java.lang.String username, java.lang.Object credentials, ServletRequest request)
login
in interface LoginService
public boolean validate(org.eclipse.jetty.server.UserIdentity user)
validate
in interface LoginService
public void logout(org.eclipse.jetty.server.UserIdentity user)
logout
in interface LoginService
protected java.lang.String[] getGroups(javax.security.auth.Subject subject)
subject
- the Subject representing the userCopyright © 1995–2018 Webtide. All rights reserved.