Package net.schmizz.sshj.userauth.method
Class AuthPassword
- java.lang.Object
-
- net.schmizz.sshj.userauth.method.AbstractAuthMethod
-
- net.schmizz.sshj.userauth.method.AuthPassword
-
- All Implemented Interfaces:
SSHPacketHandler,AuthMethod
public class AuthPassword extends AbstractAuthMethod
Implements thepasswordauthentication method. Password-change request handling is not currently supported.
-
-
Field Summary
-
Fields inherited from class net.schmizz.sshj.userauth.method.AbstractAuthMethod
log, params
-
-
Constructor Summary
Constructors Constructor Description AuthPassword(PasswordFinder pwdf)AuthPassword(PasswordFinder pwdf, PasswordUpdateProvider newPasswordProvider)
-
Method Summary
Modifier and Type Method Description SSHPacketbuildReq()Builds aSSHPacketcontaining the fields common to all authentication method.voidhandle(Message cmd, SSHPacket buf)Delegate handling of some SSH packet to this object.booleanshouldRetry()Returnstrueif the associatedPasswordFindertells that we should retry with a new password that it will supply.-
Methods inherited from class net.schmizz.sshj.userauth.method.AbstractAuthMethod
getName, init, makeAccountResource, request, setLoggerFactory
-
-
-
-
Constructor Detail
-
AuthPassword
public AuthPassword(PasswordFinder pwdf)
-
AuthPassword
public AuthPassword(PasswordFinder pwdf, PasswordUpdateProvider newPasswordProvider)
-
-
Method Detail
-
buildReq
public SSHPacket buildReq() throws UserAuthException
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
public void handle(Message cmd, SSHPacket buf) throws UserAuthException, TransportException
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.
-
-