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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description char[]
provideNewPassword(Resource<?> resource, java.lang.String prompt)
Called with the prompt received from the SSH server.boolean
shouldRetry(Resource<?> resource)
If password turns out to be incorrect, indicates whether another call toprovideNewPassword(Resource, String)
should be made.
-
-
-
Method Detail
-
provideNewPassword
char[] provideNewPassword(Resource<?> resource, java.lang.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 toprovideNewPassword(Resource, String)
should be made. This method is geared at interactive implementations, and stub implementations may simply returnfalse
.- Parameters:
resource
- the resource for which the updated password is being requested- Returns:
- whether to retry requesting the updated password for a particular resource
-
-