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

public Class UserAuthHostBased

extends AbstractUserAuth
implements SignatureFactoriesManager
Class Inheritance
All Implemented Interfaces
org.apache.sshd.common.signature.SignatureFactoriesManager, org.apache.sshd.common.signature.SignatureFactoriesHolder
Imports
java.security.KeyPair, .PublicKey, java.security.cert.X509Certificate, java.util.Collection, .Iterator, .List, .Map, org.apache.sshd.client.auth.AbstractUserAuth, org.apache.sshd.client.session.ClientSession, org.apache.sshd.common.NamedFactory, .SshConstants, org.apache.sshd.common.config.keys.KeyUtils, org.apache.sshd.common.signature.Signature, .SignatureFactoriesManager, org.apache.sshd.common.util.GenericUtils, .OsUtils, .ValidateUtils, org.apache.sshd.common.util.buffer.Buffer, .BufferUtils, .ByteArrayBuffer, org.apache.sshd.common.util.net.SshdSocketAddress

Author
Apache MINA SSHD Project

Field Summary

Modifier and TypeField and Description
protected final HostKeyIdentityProvider
private String
private String
private List<NamedFactory<Signature>>
protected Map.Entry<KeyPair, ? extends Collection<X509Certificate>>
protected Iterator<? extends Map.Entry<KeyPair, ? extends Collection<X509Certificate>>>
public static final String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected byte[]
appendSignature(ClientSession session, String service, String keyType, PublicKey key, byte[] keyBytes, String clientHostname, String clientUsername, Signature verifier, Buffer buffer)

public String
public String
public List<NamedFactory<Signature>>
public void
protected boolean
protected String
protected String
protected boolean
public void
setClientHostname(String clientHostname)

public void
setClientUsername(String clientUsername)

public void
public void
signalAuthMethodFailure(ClientSession session, String
The requesting service name
service
,
boolean
true if some partial authentication success so far
partial
,
List<String>
The List of authentication methods that can continue
serverMethods
,
Buffer
The Buffer containing the failure message (after having consumed the relevant data from it)
buffer
)

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

Signals reception of SSH_MSG_USERAUTH_FAILURE message

public void
signalAuthMethodSuccess(ClientSession session, String
The requesting service name
service
,
Buffer
The Buffer containing the success message (after having consumed the relevant data from it)
buffer
)

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

Signal reception of SSH_MSG_USERAUTH_SUCCESS message

Inherited from org.apache.sshd.client.auth.AbstractUserAuth:
destroygetClientSessiongetNamegetServicegetSessionisCancellableprocesssetCancellabletoString

Field Detail

clientHostKeysback to summary
protected final HostKeyIdentityProvider clientHostKeys
clientHostnameback to summary
private String clientHostname
clientUsernameback to summary
private String clientUsername
factoriesback to summary
private List<NamedFactory<Signature>> factories
keyInfoback to summary
protected Map.Entry<KeyPair, ? extends Collection<X509Certificate>> keyInfo
keysback to summary
protected Iterator<? extends Map.Entry<KeyPair, ? extends Collection<X509Certificate>>> keys
NAMEback to summary
public static final String NAME

Constructor Detail

UserAuthHostBasedback to summary
public UserAuthHostBased(HostKeyIdentityProvider clientHostKeys)

Method Detail

appendSignatureback to summary
protected byte[] appendSignature(ClientSession session, String service, String keyType, PublicKey key, byte[] keyBytes, String clientHostname, String clientUsername, Signature verifier, Buffer buffer) throws Exception
Annotations
@SuppressWarnings:checkstyle:ParameterNumber
getClientHostnameback to summary
public String getClientHostname()
getClientUsernameback to summary
public String getClientUsername()
getSignatureFactoriesback to summary
public List<NamedFactory<Signature>> getSignatureFactories()

Implements org.apache.sshd.common.signature.SignatureFactoriesHolder.getSignatureFactories.

Returns:List<NamedFactory<Signature>>

Doc from org.apache.sshd.common.signature.SignatureFactoriesHolder.getSignatureFactories.

The list of named Signature factories

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

Overrides org.apache.sshd.client.auth.AbstractUserAuth.init.

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

processAuthDataRequestback to summary
protected boolean processAuthDataRequest(ClientSession session, String service, Buffer buffer) throws Exception

Implements abstract org.apache.sshd.client.auth.AbstractUserAuth.processAuthDataRequest.

Annotations
@Override
resolveClientHostnameback to summary
protected String resolveClientHostname(ClientSession session)
resolveClientUsernameback to summary
protected String resolveClientUsername(ClientSession session)
sendAuthDataRequestback to summary
protected boolean sendAuthDataRequest(ClientSession session, String service) throws Exception

Implements abstract org.apache.sshd.client.auth.AbstractUserAuth.sendAuthDataRequest.

Annotations
@Override
setClientHostnameback to summary
public void setClientHostname(String clientHostname)
setClientUsernameback to summary
public void setClientUsername(String clientUsername)
setSignatureFactoriesback to summary
public void setSignatureFactories(List<NamedFactory<Signature>> factories)

Implements org.apache.sshd.common.signature.SignatureFactoriesManager.setSignatureFactories.

Annotations
@Override
signalAuthMethodFailureback to summary
public void signalAuthMethodFailure(ClientSession session, String service, boolean partial, List<String> serverMethods, Buffer buffer) throws Exception

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

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

Signals reception of SSH_MSG_USERAUTH_FAILURE message

Parameters
session:ClientSession

The ClientSession

service:String

The requesting service name

partial:boolean

true if some partial authentication success so far

serverMethods:List<String>

The List of authentication methods that can continue

buffer:Buffer

The Buffer containing the failure message (after having consumed the relevant data from it)

Annotations
@Override
Exceptions
Exception:
If failed to handle the callback - Note: may cause session close
signalAuthMethodSuccessback to summary
public void signalAuthMethodSuccess(ClientSession session, String service, Buffer buffer) throws Exception

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

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

Signal reception of SSH_MSG_USERAUTH_SUCCESS message

Parameters
session:ClientSession

The ClientSession

service:String

The requesting service name

buffer:Buffer

The Buffer containing the success message (after having consumed the relevant data from it)

Annotations
@Override
Exceptions
Exception:
If failed to handle the callback - Note: may cause session close