|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.mindbright.ssh2.SSH2AuthPassword
This class implements a module for password authentication as defined in the
userauth protocol spec. It can either be used passively (i.e. the password is
known beforehand), or it can be used interactively through the
SSH2Interactor callback interface.
SSH2AuthModule| Field Summary | |
static java.lang.String |
STANDARD_NAME
|
| Constructor Summary | |
SSH2AuthPassword(SSH2Interactor interactor,
java.lang.String prompt)
Creates an instance which will always query the user. |
|
SSH2AuthPassword(SSH2Interactor interactor,
java.lang.String prompt,
java.lang.String password)
Creates an instance which will first test with the given password. |
|
SSH2AuthPassword(java.lang.String password)
Creates an instance which will never query the user. |
|
| Method Summary | |
void |
clearSensitiveData()
Clean up any sensitive data in this authentication module. |
protected java.lang.String |
getNewPassword(java.lang.String prompt,
java.lang.String language)
|
protected java.lang.String |
getPassword()
|
java.lang.String |
getStandardName()
Should give the standard name of this module as used in the userauth protocol. |
SSH2TransportPDU |
processMethodMessage(SSH2UserAuth userAuth,
SSH2TransportPDU pdu)
Processes the given method specific packet and returns a new packet which will be sent to peer to continue the authentication. |
boolean |
retryPointless()
Returns true if there is not any point in trying this method again after it has failed once. |
void |
setNewPassword(java.lang.String newPassword)
|
void |
setPassword(java.lang.String password)
|
SSH2TransportPDU |
startAuthentication(SSH2UserAuth userAuth)
Starts the execution of this module, called from the given SSH2UserAuth. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String STANDARD_NAME
| Constructor Detail |
public SSH2AuthPassword(java.lang.String password)
password - Password to authenticate with once
public SSH2AuthPassword(SSH2Interactor interactor,
java.lang.String prompt)
interactor - Interactor used to query the userprompt - The prompt which will be shown to the user
public SSH2AuthPassword(SSH2Interactor interactor,
java.lang.String prompt,
java.lang.String password)
interactor - Interactor used to query the userprompt - The prompt which will be shown to the userpassword - Password to try to authenticate with once| Method Detail |
public void setPassword(java.lang.String password)
public void setNewPassword(java.lang.String newPassword)
protected java.lang.String getPassword()
throws SSH2UserCancelException
SSH2UserCancelException
protected java.lang.String getNewPassword(java.lang.String prompt,
java.lang.String language)
throws SSH2UserCancelException
SSH2UserCancelExceptionpublic java.lang.String getStandardName()
SSH2AuthModule
getStandardName in interface SSH2AuthModule
public SSH2TransportPDU processMethodMessage(SSH2UserAuth userAuth,
SSH2TransportPDU pdu)
throws SSH2UserCancelException
SSH2AuthModule
processMethodMessage in interface SSH2AuthModuleuserAuth - the authentication layer responsiblepdu - the method specific packet
null if no packet
should be sent.
SSH2UserCancelException
public SSH2TransportPDU startAuthentication(SSH2UserAuth userAuth)
throws SSH2UserCancelException
SSH2AuthModuleSSH2UserAuth.
startAuthentication in interface SSH2AuthModuleuserAuth - the authentication layer responsible
SSH2UserCancelExceptionpublic void clearSensitiveData()
SSH2AuthModule
clearSensitiveData in interface SSH2AuthModulepublic boolean retryPointless()
SSH2AuthModule
retryPointless in interface SSH2AuthModule
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||