Class EmptyLoginService

  • All Implemented Interfaces:
    LoginService

    public class EmptyLoginService
    extends java.lang.Object
    implements LoginService
    LoginService implementation which always denies any attempt to login.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      IdentityService getIdentityService()
      Get the IdentityService associated with this Login Service.
      java.lang.String getName()  
      org.eclipse.jetty.server.UserIdentity login​(java.lang.String username, java.lang.Object credentials, jakarta.servlet.ServletRequest request)
      Login a user.
      void logout​(org.eclipse.jetty.server.UserIdentity user)  
      void setIdentityService​(IdentityService service)
      Set the IdentityService associated with this Login Service.
      boolean validate​(org.eclipse.jetty.server.UserIdentity user)
      Validate a user identity.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • EmptyLoginService

        public EmptyLoginService()
    • Method Detail

      • getName

        public java.lang.String getName()
        Specified by:
        getName in interface LoginService
        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: LoginService
        Login a user.
        Specified by:
        login in interface LoginService
        Parameters:
        username - The user name
        credentials - The users credentials
        request - TODO
        Returns:
        A UserIdentity if the credentials matched, otherwise null
      • validate

        public boolean validate​(org.eclipse.jetty.server.UserIdentity user)
        Description copied from interface: LoginService
        Validate a user identity. Validate that a UserIdentity previously created by a call to LoginService.login(String, Object, ServletRequest) is still valid.
        Specified by:
        validate in interface LoginService
        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: LoginService
        Get the IdentityService associated with this Login Service.
        Specified by:
        getIdentityService in interface LoginService
        Returns:
        the IdentityService associated with this Login Service.
      • setIdentityService

        public void setIdentityService​(IdentityService service)
        Description copied from interface: LoginService
        Set the IdentityService associated with this Login Service.
        Specified by:
        setIdentityService in interface LoginService
        Parameters:
        service - the IdentityService associated with this Login Service.
      • logout

        public void logout​(org.eclipse.jetty.server.UserIdentity user)
        Specified by:
        logout in interface LoginService