Package org.eclipse.jetty.jaas
Class JAASLoginService
- java.lang.Object
-
- org.eclipse.jetty.util.component.AbstractLifeCycle
-
- org.eclipse.jetty.jaas.JAASLoginService
-
- All Implemented Interfaces:
LoginService,org.eclipse.jetty.util.component.LifeCycle
public class JAASLoginService extends org.eclipse.jetty.util.component.AbstractLifeCycle implements LoginService
JAASLoginService
-
-
Field Summary
Fields Modifier and Type Field Description protected String_callbackHandlerClassprotected JAASUserPrincipal_defaultUserprotected IdentityService_identityServiceprotected String_loginModuleNameprotected String_realmNameprotected String[]_roleClassNamesstatic StringDEFAULT_ROLE_CLASS_NAMEstatic String[]DEFAULT_ROLE_CLASS_NAMES
-
Constructor Summary
Constructors Constructor Description JAASLoginService()Constructor.JAASLoginService(String name)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoStart()IdentityServicegetIdentityService()Get the identityService.StringgetName()Get the name of the realm.String[]getRoleClassNames()org.eclipse.jetty.server.UserIdentitylogin(String username, Object credentials, javax.servlet.ServletRequest request)voidlogout(org.eclipse.jetty.server.UserIdentity user)voidsetCallbackHandlerClass(String classname)voidsetIdentityService(IdentityService identityService)Set the identityService.voidsetLoginModuleName(String name)Set the name to use to index into the config file of LoginModules.voidsetName(String name)Set the name of the realmvoidsetRoleClassNames(String[] classnames)booleanvalidate(org.eclipse.jetty.server.UserIdentity user)
-
-
-
Field Detail
-
DEFAULT_ROLE_CLASS_NAME
public static final String DEFAULT_ROLE_CLASS_NAME
- See Also:
- Constant Field Values
-
DEFAULT_ROLE_CLASS_NAMES
public static final String[] DEFAULT_ROLE_CLASS_NAMES
-
_roleClassNames
protected String[] _roleClassNames
-
_callbackHandlerClass
protected String _callbackHandlerClass
-
_realmName
protected String _realmName
-
_loginModuleName
protected String _loginModuleName
-
_defaultUser
protected JAASUserPrincipal _defaultUser
-
_identityService
protected IdentityService _identityService
-
-
Constructor Detail
-
JAASLoginService
public JAASLoginService()
Constructor.
-
JAASLoginService
public JAASLoginService(String name)
Constructor.- Parameters:
name- the name of the realm
-
-
Method Detail
-
getName
public String getName()
Get the name of the realm.- Specified by:
getNamein interfaceLoginService- Returns:
- name or null if not set.
-
setName
public void setName(String name)
Set the name of the realm- Parameters:
name- aStringvalue
-
getIdentityService
public IdentityService getIdentityService()
Get the identityService.- Specified by:
getIdentityServicein interfaceLoginService- Returns:
- the identityService
-
setIdentityService
public void setIdentityService(IdentityService identityService)
Set the identityService.- Specified by:
setIdentityServicein interfaceLoginService- Parameters:
identityService- the identityService to set
-
setLoginModuleName
public void setLoginModuleName(String name)
Set the name to use to index into the config file of LoginModules.- Parameters:
name- aStringvalue
-
setCallbackHandlerClass
public void setCallbackHandlerClass(String classname)
-
setRoleClassNames
public void setRoleClassNames(String[] classnames)
-
getRoleClassNames
public String[] getRoleClassNames()
-
doStart
protected void doStart() throws Exception- Overrides:
doStartin classorg.eclipse.jetty.util.component.AbstractLifeCycle- Throws:
Exception- See Also:
AbstractLifeCycle.doStart()
-
login
public org.eclipse.jetty.server.UserIdentity login(String username, Object credentials, javax.servlet.ServletRequest request)
- Specified by:
loginin interfaceLoginService
-
validate
public boolean validate(org.eclipse.jetty.server.UserIdentity user)
- Specified by:
validatein interfaceLoginService
-
logout
public void logout(org.eclipse.jetty.server.UserIdentity user)
- Specified by:
logoutin interfaceLoginService
-
-