Interface PasswordUpdateProvider


public interface PasswordUpdateProvider
Callback that can be implemented to allow an application to provide an updated password for the 'auth-password' authentication method.
  • Method Details

    • provideNewPassword

      char[] provideNewPassword(Resource<?> resource, String prompt)
      Called with the prompt received from the SSH server. This should return the updated password for the user that is currently authenticating.
      Parameters:
      resource - The resource for which the updated password is being requested.
      prompt - The password update prompt received from the SSH Server.
      Returns:
      The new password for the resource.
    • shouldRetry

      boolean shouldRetry(Resource<?> resource)
      If password turns out to be incorrect, indicates whether another call to provideNewPassword(Resource, String) should be made.

      This method is geared at interactive implementations, and stub implementations may simply return false.

      Parameters:
      resource - the resource for which the updated password is being requested
      Returns:
      whether to retry requesting the updated password for a particular resource