- java.lang.Object
-
- org.eclipse.jetty.security.EmptyLoginService
-
- All Implemented Interfaces:
LoginService
public class EmptyLoginService extends java.lang.Object implements LoginService
LoginService implementation which always denies any attempt to login.
-
-
Constructor Summary
Constructors Constructor Description EmptyLoginService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IdentityServicegetIdentityService()Get the IdentityService associated with this Login Service.java.lang.StringgetName()org.eclipse.jetty.server.UserIdentitylogin(java.lang.String username, java.lang.Object credentials, jakarta.servlet.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
public java.lang.String getName()
- Specified by:
getNamein interfaceLoginService- Returns:
- Get the name of the login service (aka Realm name)
-
login
public org.eclipse.jetty.server.UserIdentity login(java.lang.String username, java.lang.Object credentials, jakarta.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
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.
-
setIdentityService
public void setIdentityService(IdentityService service)
Description copied from interface:LoginServiceSet the IdentityService associated with this Login Service.- Specified by:
setIdentityServicein interfaceLoginService- Parameters:
service- the IdentityService associated with this Login Service.
-
logout
public void logout(org.eclipse.jetty.server.UserIdentity user)
- Specified by:
logoutin interfaceLoginService
-
-