Class UserAuthPassword

    • Field Detail

      • passwords

        private java.util.Iterator<java.lang.String> passwords
      • current

        private java.lang.String current
    • Constructor Detail

      • UserAuthPassword

        public UserAuthPassword()
    • Method Detail

      • init

        public void init​(ClientSession session,
                         java.lang.String service)
                  throws java.lang.Exception
        Specified by:
        init in interface UserAuth
        Overrides:
        init in class AbstractUserAuth
        Parameters:
        session - The ClientSession
        service - The requesting service name
        Throws:
        java.lang.Exception - If failed to initialize the mechanism
      • sendPassword

        protected IoWriteFuture sendPassword​(Buffer buffer,
                                             ClientSession session,
                                             java.lang.String oldPassword,
                                             java.lang.String newPassword)
                                      throws java.io.IOException
        Sends the password via a SSH_MSG_USERAUTH_REQUEST message. If old and new password are not the same then it requests a password modification from the server (which may be denied if the server does not support this feature).
        Parameters:
        buffer - The Buffer to re-use for sending the message
        session - The target ClientSession
        oldPassword - The previous password
        newPassword - The new password
        Returns:
        An IoWriteFuture that can be used to wait and check on the success/failure of the request packet being sent
        Throws:
        java.io.IOException - If failed to send the message.