Class UserAuthPassword

    • Constructor Detail

      • UserAuthPassword

        public UserAuthPassword()
    • Method Detail

      • doAuth

        public java.lang.Boolean doAuth​(Buffer buffer,
                                        boolean init)
                                 throws java.lang.Exception
        Specified by:
        doAuth in class AbstractUserAuth
        Throws:
        java.lang.Exception
      • handleClientPasswordChangeRequest

        protected java.lang.Boolean handleClientPasswordChangeRequest​(Buffer buffer,
                                                                      ServerSession session,
                                                                      java.lang.String username,
                                                                      java.lang.String oldPassword,
                                                                      java.lang.String newPassword)
                                                               throws java.lang.Exception
        Invoked when the client sends a SSH_MSG_USERAUTH_REQUEST indicating a password change. Throws UnsupportedOperationException by default
        Parameters:
        buffer - The Buffer to re-use in order to respond
        session - The associated ServerSession
        username - The username
        oldPassword - The old password
        newPassword - The new password
        Returns:
        Password change and authentication result - null means authentication incomplete - i.e., handler has sent some extra query.
        Throws:
        java.lang.Exception - If failed to handle the request.
      • handleServerPasswordChangeRequest

        protected java.lang.Boolean handleServerPasswordChangeRequest​(Buffer buffer,
                                                                      ServerSession session,
                                                                      java.lang.String username,
                                                                      java.lang.String password,
                                                                      PasswordChangeRequiredException e)
                                                               throws java.lang.Exception
        Invoked by checkPassword(Buffer, ServerSession, String, String) when a PasswordChangeRequiredException was thrown by the authenticator. By default it re-throws the original exception.
        Parameters:
        buffer - The received Buffer to be re-used if need to send a password change request
        session - The ServerSession through which the request was received
        username - The username
        password - The (rejected) password
        e - The original thrown exception
        Returns:
        null by default to indicate incomplete authentication
        Throws:
        java.lang.Exception - If failed to dispatch the message