Class AuthServiceImpl<T>

    • Constructor Detail

      • AuthServiceImpl

        public AuthServiceImpl​(Authenticator authenticator,
                               SessionManager<T> sessionManager)
        Creates a new authentication service implementation with the given authenticator and session manager.
        Parameters:
        authenticator - The authenticator.
        sessionManager - The session manager.
    • Method Detail

      • getAuthenticator

        public Authenticator getAuthenticator()
        Returns the receiver's authenticator.
        Returns:
        The authenticator.
      • loginImpl

        private SessionId loginImpl​(StatelessClientContext context,
                                    String user,
                                    char[] password)
                             throws I18NException
        Logs in the client with the given context, provided the given credentials are acceptable.
        Parameters:
        context - The context.
        user - The user name.
        password - The password.
        Returns:
        The ID of the new session.
        Throws:
        I18NException - Thrown if the authenticator rejects the credentials.
      • logout

        private void logout​(ClientContext context,
                            SessionHolder<T> sessionHolder)
        Logs out the client with the given context and associated session holder. This method is a no-op if there is no active session for that client.
        Parameters:
        sessionHolder - The holder, which may be null.
      • login

        public SessionId login​(StatelessClientContext context,
                               String user,
                               char[] password)
                        throws RemoteException
        Description copied from interface: AuthService
        Logs in the client with the given context, provided the given credentials are acceptable.
        Specified by:
        login in interface AuthService
        Parameters:
        context - The context.
        user - The user name.
        password - The password. Upon return, its contents are cleared (on the server) by overwriting all prior characters with the nul ('\0') character.
        Returns:
        The ID of the new session.
        Throws:
        RemoteException - Thrown if the operation cannot be completed.
      • logout

        public void logout​(ClientContext context)
                    throws RemoteException
        Description copied from interface: AuthService
        Logs out the client with the given context. This method is a no-op if there is no active session for that client.
        Specified by:
        logout in interface AuthService
        Parameters:
        context - The context.
        Throws:
        RemoteException - Thrown if the operation cannot be completed.