Package org.eclipse.jetty.security
Interface LoginService
-
- All Known Implementing Classes:
AbstractLoginService,ConfigurableSpnegoLoginService,HashLoginService,JDBCLoginService,SpnegoLoginService
public interface LoginServiceLogin Service Interface.The Login service provides an abstract mechanism for an
Authenticatorto check credentials and to create aUserIdentityusing the setIdentityService.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IdentityServicegetIdentityService()Get the IdentityService associated with this Login Service.StringgetName()org.eclipse.jetty.server.UserIdentitylogin(String username, Object credentials, ServletRequest request)Login a user.voidlogout(org.eclipse.jetty.server.UserIdentity user)voidsetIdentityService(IdentityService service)Set the IdentityService associated with this Login Service.booleanvalidate(org.eclipse.jetty.server.UserIdentity user)Validate a user identity.
-
-
-
Method Detail
-
getName
String getName()
- Returns:
- Get the name of the login service (aka Realm name)
-
login
org.eclipse.jetty.server.UserIdentity login(String username, Object credentials, ServletRequest request)
Login a user.- Parameters:
username- The user namecredentials- The users credentialsrequest- TODO- Returns:
- A UserIdentity if the credentials matched, otherwise null
-
validate
boolean validate(org.eclipse.jetty.server.UserIdentity user)
Validate a user identity. Validate that a UserIdentity previously created by a call tologin(String, Object, ServletRequest)is still valid.- Parameters:
user- The user to validate- Returns:
- true if authentication has not been revoked for the user.
-
getIdentityService
IdentityService getIdentityService()
Get the IdentityService associated with this Login Service.- Returns:
- the IdentityService associated with this Login Service.
-
setIdentityService
void setIdentityService(IdentityService service)
Set the IdentityService associated with this Login Service.- Parameters:
service- the IdentityService associated with this Login Service.
-
logout
void logout(org.eclipse.jetty.server.UserIdentity user)
-
-