com.mindbright.ssh2
public interface SSH2AuthModule
SSH2Authenticator
with which it should be used.
An authentication module is started when SSH2UserAuth
calls its startAuthentication
method which must return
the first packet to send to the peer to initiate this
authentication method. After this the module gets all incoming
method specific packets passed to its
processMethodMessage
method. This method is expected
to return formatted packets which the peer end of the
authentication wants in response. Exceptions that occur during the
execution of a module is reported to the corresponding
SSH2Authenticator
. The special exception
SSH2UserCancelException
can be thrown to indicate that
the user canceled this authentication method and that
authentication should not continue.
Request packets can created with the convenience method
createUserAuthRequest
in
SSH2UserAuth
. Method specific packets are created with
the ordinary createOutgoingPacket
method in
SSH2TransportPDU
.
SSH2UserAuth
,
SSH2Authenticator
,
SSH2TransportPDU
Modifier and Type | Method and Description |
---|---|
void |
clearSensitiveData()
Clean up any sensitive data in this authentication module.
|
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.
|
SSH2TransportPDU |
startAuthentication(SSH2UserAuth userAuth)
Starts the execution of this module, called from the given
SSH2UserAuth . |
java.lang.String getStandardName()
SSH2TransportPDU startAuthentication(SSH2UserAuth userAuth) throws SSH2Exception
SSH2UserAuth
.userAuth
- the authentication layer responsibleSSH2Exception
- if an error occursSSH2TransportPDU processMethodMessage(SSH2UserAuth userAuth, SSH2TransportPDU pdu) throws SSH2Exception
userAuth
- the authentication layer responsiblepdu
- the method specific packetnull
if no packet
should be sent.SSH2Exception
- if an error occursvoid clearSensitiveData()
boolean retryPointless()