Class AuthPassword
java.lang.Object
net.schmizz.sshj.userauth.method.AbstractAuthMethod
net.schmizz.sshj.userauth.method.AuthPassword
- All Implemented Interfaces:
SSHPacketHandler, AuthMethod
Implements the
password authentication method. Password-change request handling is not currently supported.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final PasswordUpdateProviderprivate static final PasswordUpdateProviderprivate final PasswordFinderFields inherited from class AbstractAuthMethod
log, params -
Constructor Summary
ConstructorsConstructorDescriptionAuthPassword(PasswordFinder pwdf) AuthPassword(PasswordFinder pwdf, PasswordUpdateProvider newPasswordProvider) -
Method Summary
Modifier and TypeMethodDescriptionbuildReq()Builds aSSHPacketcontaining the fields common to all authentication method.voidDelegate handling of some SSH packet to this object.booleanReturnstrueif the associatedPasswordFindertells that we should retry with a new password that it will supply.Methods inherited from class AbstractAuthMethod
getName, init, makeAccountResource, request, setLoggerFactory
-
Field Details
-
pwdf
-
nullProvider
-
newPasswordProvider
-
-
Constructor Details
-
AuthPassword
-
AuthPassword
-
-
Method Details
-
buildReq
Description copied from class:AbstractAuthMethodBuilds aSSHPacketcontaining the fields common to all authentication method. Method-specific fields can further be put into this buffer.- Overrides:
buildReqin classAbstractAuthMethod- Throws:
UserAuthException
-
handle
Description copied from interface:SSHPacketHandlerDelegate handling of some SSH packet to this object.- Specified by:
handlein interfaceSSHPacketHandler- Overrides:
handlein classAbstractAuthMethod- Parameters:
cmd- the SSHmessage identifierbuf-SSHPacketcontaining rest of the request- Throws:
UserAuthExceptionTransportException
-
shouldRetry
public boolean shouldRetry()Returnstrueif the associatedPasswordFindertells that we should retry with a new password that it will supply.- Specified by:
shouldRetryin interfaceAuthMethod- Overrides:
shouldRetryin classAbstractAuthMethod- Returns:
- whether authentication should be reattempted if it failed.
-