public interface

PasswordFinder

net.schmizz.sshj.userauth.password.PasswordFinder

Class Overview

Services requests for plaintext passwords.

Summary

Public Methods
abstract char[] reqPassword(Resource<?> resource)
Request password for specified resource.
abstract boolean shouldRetry(Resource<?> resource)
If password turns out to be incorrect, indicates whether another call to reqPassword(Resource) should be made.

Public Methods

public abstract char[] reqPassword (Resource<?> resource)

Request password for specified resource.

This method may return null when the request cannot be serviced, e.g. when the user cancels a password prompt.

Parameters
resource The resource for which password is being requested
Returns
  • the password or null

public abstract boolean shouldRetry (Resource<?> resource)

If password turns out to be incorrect, indicates whether another call to reqPassword(Resource) should be made.

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

Parameters
resource The resource for which password is being requested
Returns
  • whether to retry requesting password for a particular resource