java.lang.Object
org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.util.component.ContainerLifeCycle
org.eclipse.jetty.security.AbstractLoginService
- All Implemented Interfaces:
LoginService,org.eclipse.jetty.util.component.Container,org.eclipse.jetty.util.component.Destroyable,org.eclipse.jetty.util.component.Dumpable,org.eclipse.jetty.util.component.Dumpable.DumpableContainer,org.eclipse.jetty.util.component.LifeCycle
- Direct Known Subclasses:
HashLoginService,JDBCLoginService
public abstract class AbstractLoginService
extends org.eclipse.jetty.util.component.ContainerLifeCycle
implements LoginService
AbstractLoginService
Base class for LoginServices that allows subclasses to provide the user authentication and authorization information,
but provides common behaviour such as handling authentication.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.util.component.AbstractLifeCycle.AbstractLifeCycleListener, org.eclipse.jetty.util.component.AbstractLifeCycle.StopExceptionNested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Container
org.eclipse.jetty.util.component.Container.InheritedListener, org.eclipse.jetty.util.component.Container.ListenerNested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Dumpable
org.eclipse.jetty.util.component.Dumpable.DumpableContainerNested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle
org.eclipse.jetty.util.component.LifeCycle.Listener -
Field Summary
FieldsFields inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
FAILED, STARTED, STARTING, STOPPED, STOPPINGFields inherited from interface org.eclipse.jetty.util.component.Dumpable
KEY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the IdentityService associated with this Login Service.getName()booleanprotected abstract List<RolePrincipal>loadRoleInfo(UserPrincipal user) protected abstract UserPrincipalloadUserInfo(String username) org.eclipse.jetty.server.UserIdentityLogin a user.voidlogout(org.eclipse.jetty.server.UserIdentity user) voidsetFullValidate(boolean fullValidate) voidsetIdentityService(IdentityService identityService) Set the identityService.voidSet the name.toString()booleanvalidate(org.eclipse.jetty.server.UserIdentity user) Validate a user identity.Methods inherited from class org.eclipse.jetty.util.component.ContainerLifeCycle
addBean, addBean, addEventListener, addManaged, contains, destroy, doStart, doStop, dump, dump, dump, dumpObjects, dumpStdErr, getBean, getBeans, getBeans, getContainedBeans, getContainedBeans, isAuto, isManaged, isUnmanaged, manage, removeBean, removeBeans, removeEventListener, setBeans, start, stop, unmanage, updateBean, updateBean, updateBeans, updateBeansMethods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
getEventListeners, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, setEventListeners, start, stopMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.jetty.util.component.Container
getCachedBeans, getEventListenersMethods inherited from interface org.eclipse.jetty.util.component.Dumpable
dumpSelfMethods inherited from interface org.eclipse.jetty.util.component.Dumpable.DumpableContainer
isDumpable
-
Field Details
-
_identityService
-
_name
-
_fullValidate
protected boolean _fullValidate
-
-
Constructor Details
-
AbstractLoginService
protected AbstractLoginService()
-
-
Method Details
-
loadRoleInfo
-
loadUserInfo
-
getName
- Specified by:
getNamein interfaceLoginService- Returns:
- Get the name of the login service (aka Realm name)
-
setIdentityService
Set the identityService.- Specified by:
setIdentityServicein interfaceLoginService- Parameters:
identityService- the identityService to set
-
setName
Set the name.- Parameters:
name- the name to set
-
toString
- Overrides:
toStringin classorg.eclipse.jetty.util.component.AbstractLifeCycle
-
login
public org.eclipse.jetty.server.UserIdentity login(String username, Object credentials, javax.servlet.ServletRequest request) Description copied from interface:LoginServiceLogin a user.- Specified by:
loginin interfaceLoginService- Parameters:
username- The user namecredentials- The users credentialsrequest- TODO- Returns:
- A UserIdentity if the credentials matched, otherwise null
-
validate
public boolean validate(org.eclipse.jetty.server.UserIdentity user) Description copied from interface:LoginServiceValidate a user identity. Validate that a UserIdentity previously created by a call toLoginService.login(String, Object, ServletRequest)is still valid.- Specified by:
validatein interfaceLoginService- Parameters:
user- The user to validate- Returns:
- true if authentication has not been revoked for the user.
-
getIdentityService
Description copied from interface:LoginServiceGet the IdentityService associated with this Login Service.- Specified by:
getIdentityServicein interfaceLoginService- Returns:
- the IdentityService associated with this Login Service.
-
logout
public void logout(org.eclipse.jetty.server.UserIdentity user) - Specified by:
logoutin interfaceLoginService
-
isFullValidate
public boolean isFullValidate() -
setFullValidate
public void setFullValidate(boolean fullValidate)
-