Class JAASLoginService

  • All Implemented Interfaces:
    LoginService, org.eclipse.jetty.util.component.LifeCycle

    public class JAASLoginService
    extends org.eclipse.jetty.util.component.AbstractLifeCycle
    implements LoginService
    JAASLoginService
    • Field Detail

      • DEFAULT_ROLE_CLASS_NAMES

        public static final String[] DEFAULT_ROLE_CLASS_NAMES
      • _roleClassNames

        protected String[] _roleClassNames
      • _callbackHandlerClass

        protected String _callbackHandlerClass
      • _realmName

        protected String _realmName
      • _loginModuleName

        protected String _loginModuleName
    • Constructor Detail

      • JAASLoginService

        public JAASLoginService()
        Constructor.
      • JAASLoginService

        public JAASLoginService​(String name)
        Constructor.
        Parameters:
        name - the name of the realm
    • Method Detail

      • getName

        public String getName()
        Get the name of the realm.
        Specified by:
        getName in interface LoginService
        Returns:
        name or null if not set.
      • setName

        public void setName​(String name)
        Set the name of the realm
        Parameters:
        name - a String value
      • setIdentityService

        public void setIdentityService​(IdentityService identityService)
        Set the identityService.
        Specified by:
        setIdentityService in interface LoginService
        Parameters:
        identityService - the identityService to set
      • setLoginModuleName

        public void setLoginModuleName​(String name)
        Set the name to use to index into the config file of LoginModules.
        Parameters:
        name - a String value
      • setCallbackHandlerClass

        public void setCallbackHandlerClass​(String classname)
      • setRoleClassNames

        public void setRoleClassNames​(String[] classnames)
      • getRoleClassNames

        public String[] getRoleClassNames()
      • doStart

        protected void doStart()
                        throws Exception
        Overrides:
        doStart in class org.eclipse.jetty.util.component.AbstractLifeCycle
        Throws:
        Exception
        See Also:
        AbstractLifeCycle.doStart()
      • login

        public org.eclipse.jetty.server.UserIdentity login​(String username,
                                                           Object credentials,
                                                           javax.servlet.ServletRequest request)
        Specified by:
        login in interface LoginService
      • validate

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

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