public class SimplePasswordAuthenticator extends java.lang.Object implements SshPasswordAuthenticator
SshAuthenticator implementation that has fixed passwords and
passphrases.| Constructor and Description |
|---|
SimplePasswordAuthenticator(char[] password)
Constructor for when only password is going to be prompted for.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getTypeName()
Get the name of this authenticator (e.g "password", "publickey" etc).
|
char[] |
promptForPassword(SshClient session,
java.lang.String message)
Invoked when a password.
|
void |
setPassword(char[] password)
Set the password that will be returned when
#promptForPassword(SshSession, String) is called. |
public SimplePasswordAuthenticator(char[] password)
password - passwordpublic void setPassword(char[] password)
#promptForPassword(SshSession, String) is called.password - passwordpublic char[] promptForPassword(SshClient session, java.lang.String message)
SshPasswordPromptpromptForPassword in interface SshPasswordPromptsession - sessionmessage - messagenull if password is not available (e.g.
cancelled)public java.lang.String getTypeName()
SshAuthenticatorgetTypeName in interface SshAuthenticatorCopyright © 2018. All rights reserved.