Package org.eclipse.jetty.security
Class AbstractLoginService
- java.lang.Object
 - 
- org.eclipse.jetty.util.component.AbstractLifeCycle
 - 
- org.eclipse.jetty.util.component.ContainerLifeCycle
 - 
- org.eclipse.jetty.security.AbstractLoginService
 
 
 
 
- 
- All Implemented Interfaces:
 LoginService,Container,Destroyable,Dumpable,Dumpable.DumpableContainer,LifeCycle
- Direct Known Subclasses:
 DataSourceLoginService,HashLoginService,JDBCLoginService
public abstract class AbstractLoginService extends ContainerLifeCycle implements LoginService
AbstractLoginService 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAbstractLoginService.RolePrincipalRolePrincipalstatic classAbstractLoginService.UserPrincipalUserPrincipal- 
Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
AbstractLifeCycle.AbstractLifeCycleListener 
- 
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Container
Container.InheritedListener, Container.Listener 
- 
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Dumpable
Dumpable.DumpableContainer 
- 
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle
LifeCycle.Listener 
 - 
 
- 
Field Summary
Fields Modifier and Type Field Description protected boolean_fullValidateprotected IdentityService_identityServiceprotected java.lang.String_name 
- 
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractLoginService() 
- 
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description IdentityServicegetIdentityService()Get the IdentityService associated with this Login Service.java.lang.StringgetName()booleanisFullValidate()protected abstract java.lang.String[]loadRoleInfo(AbstractLoginService.UserPrincipal user)protected abstract AbstractLoginService.UserPrincipalloadUserInfo(java.lang.String username)UserIdentitylogin(java.lang.String username, java.lang.Object credentials, javax.servlet.ServletRequest request)Login a user.voidlogout(UserIdentity user)voidsetFullValidate(boolean fullValidate)voidsetIdentityService(IdentityService identityService)Set the identityService.voidsetName(java.lang.String name)Set the name.java.lang.StringtoString()booleanvalidate(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, dump, dump, dumpBeans, dumpObject, dumpObjects, dumpStdErr, dumpThis, getBean, getBeans, getBeans, getContainedBeans, getContainedBeans, isAuto, isManaged, isUnmanaged, manage, removeBean, removeBeans, removeEventListener, setBeans, setStopTimeout, start, stop, unmanage, updateBean, updateBean, updateBeans 
- 
Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop 
- 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait 
- 
Methods inherited from interface org.eclipse.jetty.util.component.Dumpable.DumpableContainer
isDumpable 
 - 
 
 - 
 
- 
- 
Field Detail
- 
_identityService
protected IdentityService _identityService
 
- 
_name
protected java.lang.String _name
 
- 
_fullValidate
protected boolean _fullValidate
 
 - 
 
- 
Method Detail
- 
loadRoleInfo
protected abstract java.lang.String[] loadRoleInfo(AbstractLoginService.UserPrincipal user)
 
- 
loadUserInfo
protected abstract AbstractLoginService.UserPrincipal loadUserInfo(java.lang.String username)
 
- 
getName
public java.lang.String getName()
- Specified by:
 getNamein interfaceLoginService- Returns:
 - Get the name of the login service (aka Realm name)
 - See Also:
 LoginService.getName()
 
- 
setIdentityService
public void setIdentityService(IdentityService identityService)
Set the identityService.- Specified by:
 setIdentityServicein interfaceLoginService- Parameters:
 identityService- the identityService to set
 
- 
setName
public void setName(java.lang.String name)
Set the name.- Parameters:
 name- the name to set
 
- 
toString
public java.lang.String toString()
- Overrides:
 toStringin classAbstractLifeCycle
 
- 
login
public UserIdentity login(java.lang.String username, java.lang.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
 - See Also:
 LoginService.login(java.lang.String, java.lang.Object, javax.servlet.ServletRequest)
 
- 
validate
public boolean validate(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.
 - See Also:
 LoginService.validate(org.eclipse.jetty.server.UserIdentity)
 
- 
getIdentityService
public IdentityService 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.
 - See Also:
 LoginService.getIdentityService()
 
- 
logout
public void logout(UserIdentity user)
- Specified by:
 logoutin interfaceLoginService- See Also:
 LoginService.logout(org.eclipse.jetty.server.UserIdentity)
 
- 
isFullValidate
public boolean isFullValidate()
 
- 
setFullValidate
public void setFullValidate(boolean fullValidate)
 
 - 
 
 -