Interface UserAuth

    • Method Detail

      • auth

        java.lang.Boolean auth​(ServerSession session,
                               java.lang.String username,
                               java.lang.String service,
                               Buffer buffer)
                        throws AsyncAuthException,
                               java.lang.Exception
        Try to authenticate the user. This methods should return a non null value indicating if the authentication succeeded. If the authentication is still ongoing, a null value should be returned.
        Parameters:
        session - the current ServerSession session
        username - the user trying to log in
        service - the requested service name
        buffer - the request buffer containing parameters specific to this request
        Returns:
        true if the authentication succeeded, false if the authentication failed and null if not finished yet
        Throws:
        AsyncAuthException - if the service is willing to perform an asynchronous authentication
        java.lang.Exception - if the authentication fails
      • next

        java.lang.Boolean next​(Buffer buffer)
                        throws AsyncAuthException,
                               java.lang.Exception
        Handle another step in the authentication process.
        Parameters:
        buffer - the request buffer containing parameters specific to this request
        Returns:
        true if the authentication succeeded, false if the authentication failed and null if not finished yet
        Throws:
        AsyncAuthException - if the service is willing to perform an asynchronous authentication
        java.lang.Exception - if the authentication fails
      • destroy

        void destroy()
        Free any system resources used by the module.