Top Fields Constructors Methods
org.apache.sshd.client.auth

public abstract Class AbstractUserAuth

extends AbstractLoggingBean
implements UserAuth
Class Inheritance
All Implemented Interfaces
org.apache.sshd.client.auth.UserAuth, org.apache.sshd.common.auth.UserAuthInstance, org.apache.sshd.common.NamedResource, org.apache.sshd.client.session.ClientSessionHolder
Known Direct Subclasses
org.apache.sshd.client.auth.hostbased.UserAuthHostBased, org.apache.sshd.client.auth.keyboard.UserAuthKeyboardInteractive, org.apache.sshd.client.auth.password.UserAuthPassword, org.apache.sshd.client.auth.pubkey.UserAuthPublicKey
Imports
java.util.Objects, org.apache.sshd.client.session.ClientSession, org.apache.sshd.common.util.ValidateUtils, org.apache.sshd.common.util.buffer.Buffer, org.apache.sshd.common.util.logging.AbstractLoggingBean

Author
Apache MINA SSHD Project

Field Summary

Modifier and TypeField and Description
private boolean
private ClientSession
private final String
private String
Inherited from org.apache.sshd.common.util.logging.AbstractLoggingBean:
log

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public void
destroy()

Implements org.apache.sshd.client.auth.UserAuth.destroy.

Called to release any allocated resources

public ClientSession
public final String
public String
public ClientSession
public void
init(ClientSession session, String
The requesting service name
service
)

Implements org.apache.sshd.client.auth.UserAuth.init.

public boolean
isCancellable()

Overrides default org.apache.sshd.client.auth.UserAuth.isCancellable.

Tells whether the authentication protocol is cancellable currently.

public boolean
process(Buffer
The Buffer to process - null if not a response buffer, i.e., the underlying authentication mechanism should initiate whatever challenge/response mechanism is required
buffer
)

Implements org.apache.sshd.client.auth.UserAuth.process.

protected abstract boolean
protected abstract boolean
protected void
setCancellable(boolean
true if the protocol may be canceled in its current state; false if not
cancellable
)

Sets whether the authentication protocol is currently cancellable.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from org.apache.sshd.common.util.logging.AbstractLoggingBean:
debugdebugdebugdebugdebugerrorerrorerrorerrorerrorgetSimplifiedLoggerinfoinfowarnwarnwarnwarnwarnwarnwarnwarn

Field Detail

cancellableback to summary
private boolean cancellable
clientSessionback to summary
private ClientSession clientSession
nameback to summary
private final String name
serviceback to summary
private String service

Constructor Detail

AbstractUserAuthback to summary
protected AbstractUserAuth(String name)

Method Detail

destroyback to summary
public void destroy()

Implements org.apache.sshd.client.auth.UserAuth.destroy.

Doc from org.apache.sshd.client.auth.UserAuth.destroy.

Called to release any allocated resources

Annotations
@Override
getClientSessionback to summary
public ClientSession getClientSession()

Implements org.apache.sshd.client.session.ClientSessionHolder.getClientSession.

Returns:ClientSession

Doc from org.apache.sshd.client.session.ClientSessionHolder.getClientSession.

The underlying ClientSession used

Annotations
@Override
getNameback to summary
public final String getName()

Implements org.apache.sshd.common.NamedResource.getName.

Returns:String

Doc from org.apache.sshd.common.NamedResource.getName.

The resource name

Annotations
@Override
getServiceback to summary
public String getService()
getSessionback to summary
public ClientSession getSession()

Implements org.apache.sshd.common.auth.UserAuthInstance.getSession.

Returns:ClientSession

Doc from org.apache.sshd.common.auth.UserAuthInstance.getSession.

The current session for which the authentication is being tracked

Note

may be null if the instance has not been initialized yet

Annotations
@Override
initback to summary
public void init(ClientSession session, String service) throws Exception

Implements org.apache.sshd.client.auth.UserAuth.init.

Parameters
session:ClientSession

Doc from org.apache.sshd.client.auth.UserAuth.init.

The ClientSession

service:String

Doc from org.apache.sshd.client.auth.UserAuth.init.

The requesting service name

Annotations
@Override
Exceptions
Exception:

Doc from org.apache.sshd.client.auth.UserAuth.init.

If failed to initialize the mechanism

isCancellableback to summary
public boolean isCancellable()

Overrides default org.apache.sshd.client.auth.UserAuth.isCancellable.

Doc from org.apache.sshd.client.auth.UserAuth.isCancellable.

Tells whether the authentication protocol is cancellable currently.

Returns:boolean

true if the protocol can be canceled at its current state; false if not.

Annotations
@Override
processback to summary
public boolean process(Buffer buffer) throws Exception

Implements org.apache.sshd.client.auth.UserAuth.process.

Parameters
buffer:Buffer

Doc from org.apache.sshd.client.auth.UserAuth.process.

The Buffer to process - null if not a response buffer, i.e., the underlying authentication mechanism should initiate whatever challenge/response mechanism is required

Returns:boolean

Doc from org.apache.sshd.client.auth.UserAuth.process.

true if request handled - false if the next authentication mechanism should be used

Annotations
@Override
Exceptions
Exception:

Doc from org.apache.sshd.client.auth.UserAuth.process.

If failed to process the request

processAuthDataRequestback to summary
protected abstract boolean processAuthDataRequest(ClientSession session, String service, Buffer buffer) throws Exception
sendAuthDataRequestback to summary
protected abstract boolean sendAuthDataRequest(ClientSession session, String service) throws Exception
setCancellableback to summary
protected void setCancellable(boolean cancellable)

Sets whether the authentication protocol is currently cancellable.

Parameters
cancellable:boolean

true if the protocol may be canceled in its current state; false if not

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override