Package net.schmizz.sshj.userauth.method
Class AuthKeyboardInteractive
java.lang.Object
net.schmizz.sshj.userauth.method.AbstractAuthMethod
net.schmizz.sshj.userauth.method.AuthKeyboardInteractive
- All Implemented Interfaces:
SSHPacketHandler
,AuthMethod
Implements the
keyboard-interactive
authentication method.-
Nested Class Summary
Nested Classes -
Field Summary
FieldsFields inherited from class net.schmizz.sshj.userauth.method.AbstractAuthMethod
log, params
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate String
buildReq()
Builds aSSHPacket
containing the fields common to all authentication method.void
Delegate handling of some SSH packet to this object.private void
respond
(AuthKeyboardInteractive.CharArrWrap[] userReplies) boolean
Methods inherited from class net.schmizz.sshj.userauth.method.AbstractAuthMethod
getName, init, makeAccountResource, request, setLoggerFactory
-
Field Details
-
provider
-
-
Constructor Details
-
AuthKeyboardInteractive
-
-
Method Details
-
buildReq
Description copied from class:AbstractAuthMethod
Builds aSSHPacket
containing the fields common to all authentication method. Method-specific fields can further be put into this buffer.- Overrides:
buildReq
in classAbstractAuthMethod
- Throws:
UserAuthException
-
buildCommaSeparatedSubmethodList
-
handle
Description copied from interface:SSHPacketHandler
Delegate handling of some SSH packet to this object.- Specified by:
handle
in interfaceSSHPacketHandler
- Overrides:
handle
in classAbstractAuthMethod
- Parameters:
cmd
- the SSHmessage identifier
buf
-SSHPacket
containing rest of the request- Throws:
UserAuthException
TransportException
-
respond
- Throws:
TransportException
-
shouldRetry
public boolean shouldRetry()- Specified by:
shouldRetry
in interfaceAuthMethod
- Overrides:
shouldRetry
in classAbstractAuthMethod
- Returns:
- whether authentication should be reattempted if it failed.
-