public class AuthenticationProtocolServer extends com.sshtools.common.ssh.ExecutorOperationSupport<com.sshtools.synergy.ssh.SshContext> implements com.sshtools.synergy.ssh.Service, com.sshtools.common.auth.AbstractAuthenticationProtocol<SshServerContext>
AuthenticationMechanism
. In this scenario you would simply call
either completedAuthentication()
or failedAuthentication()
to
inform the protocol that your authentication either completed or failed.Constructor and Description |
---|
AuthenticationProtocolServer(TransportProtocolServer transport)
Construct the protocol using the given transport
|
Modifier and Type | Method and Description |
---|---|
boolean |
canContinue() |
void |
completedAuthentication()
Each successful completion of an authentication method should call this
method.
|
void |
discardAuthentication()
Inform the protocol that the current authentication should be discarded.
|
void |
failedAuthentication()
A failed authentication attempt should call this method.
|
void |
failedAuthentication(boolean partial,
boolean ignoreFailed) |
SshServerContext |
getContext() |
java.lang.String |
getIdleLog() |
int |
getIdleTimeoutSeconds() |
java.lang.String |
getName() |
java.lang.Object |
getParameter(java.lang.String name) |
boolean |
idle() |
void |
markFailed() |
boolean |
processMessage(byte[] msg)
Process an SSH message.
|
void |
setParameter(java.lang.String name,
java.lang.Object value) |
void |
start()
Called by the
TransportProtocol when the service starts. |
void |
stop()
Called by the
TransportProtocol when the service stops. |
public AuthenticationProtocolServer(TransportProtocolServer transport)
transport
- java.io.IOException
public SshServerContext getContext()
getContext
in class com.sshtools.common.ssh.ExecutorOperationSupport<com.sshtools.synergy.ssh.SshContext>
public void stop()
TransportProtocol
when the service stops.stop
in interface com.sshtools.synergy.ssh.Service
public void start()
TransportProtocol
when the service starts. Here we
check for an authentication banner and send if configured.start
in interface com.sshtools.synergy.ssh.Service
public boolean processMessage(byte[] msg) throws java.io.IOException
processMessage
in interface com.sshtools.synergy.ssh.Service
msg
- the message to processjava.io.IOException
public java.lang.Object getParameter(java.lang.String name)
public void setParameter(java.lang.String name, java.lang.Object value)
public void completedAuthentication()
completedAuthentication
in interface com.sshtools.common.auth.AbstractAuthenticationProtocol<SshServerContext>
java.io.IOException
public void discardAuthentication()
discardAuthentication
in interface com.sshtools.common.auth.AbstractAuthenticationProtocol<SshServerContext>
public void failedAuthentication()
failedAuthentication
in interface com.sshtools.common.auth.AbstractAuthenticationProtocol<SshServerContext>
java.io.IOException
public void failedAuthentication(boolean partial, boolean ignoreFailed)
failedAuthentication
in interface com.sshtools.common.auth.AbstractAuthenticationProtocol<SshServerContext>
public int getIdleTimeoutSeconds()
getIdleTimeoutSeconds
in interface com.sshtools.synergy.ssh.Service
public boolean idle()
idle
in interface com.sshtools.synergy.ssh.Service
public java.lang.String getName()
getName
in interface com.sshtools.synergy.ssh.Service
public boolean canContinue()
canContinue
in interface com.sshtools.common.auth.AbstractAuthenticationProtocol<SshServerContext>
public void markFailed()
markFailed
in interface com.sshtools.common.auth.AbstractAuthenticationProtocol<SshServerContext>
public java.lang.String getIdleLog()
getIdleLog
in interface com.sshtools.synergy.ssh.Service
Copyright © 2021. All rights reserved.