Class UserAuthHostBased
java.lang.Object
org.apache.sshd.common.util.logging.AbstractLoggingBean
org.apache.sshd.client.auth.AbstractUserAuth
org.apache.sshd.client.auth.hostbased.UserAuthHostBased
- All Implemented Interfaces:
UserAuth
,ClientSessionHolder
,UserAuthInstance<ClientSession>
,NamedResource
,SignatureFactoriesHolder
,SignatureFactoriesManager
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final HostKeyIdentityProvider
private String
private String
private List<NamedFactory<Signature>>
private Iterator<? extends Map.Entry<KeyPair,
? extends Collection<X509Certificate>>> static final String
Fields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
log
Fields inherited from interface org.apache.sshd.common.NamedResource
BY_NAME_COMPARATOR, NAME_EXTRACTOR
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
appendSignature
(ClientSession session, String service, String keyType, PublicKey key, byte[] keyBytes, String clientHostname, String clientUsername, Signature verifier, Buffer buffer) void
init
(ClientSession session, String service) protected boolean
processAuthDataRequest
(ClientSession session, String service, Buffer buffer) protected String
protected String
protected boolean
sendAuthDataRequest
(ClientSession session, String service) void
setClientHostname
(String clientHostname) void
setClientUsername
(String clientUsername) void
setSignatureFactories
(List<NamedFactory<Signature>> factories) Methods inherited from class org.apache.sshd.client.auth.AbstractUserAuth
destroy, getClientSession, getName, getService, getSession, process, toString
Methods inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
debug, debug, debug, debug, debug, error, error, error, error, error, getSimplifiedLogger, info, info, warn, warn, warn, warn, warn, warn, warn, warn
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.sshd.common.signature.SignatureFactoriesHolder
getSignatureFactoriesNameList, getSignatureFactoriesNames
Methods inherited from interface org.apache.sshd.common.signature.SignatureFactoriesManager
setSignatureFactoriesNameList, setSignatureFactoriesNames, setSignatureFactoriesNames
-
Field Details
-
NAME
- See Also:
-
keys
-
clientHostKeys
-
factories
-
clientUsername
-
clientHostname
-
-
Constructor Details
-
UserAuthHostBased
-
-
Method Details
-
init
- Specified by:
init
in interfaceUserAuth
- Overrides:
init
in classAbstractUserAuth
- Parameters:
session
- TheClientSession
service
- The requesting service name- Throws:
Exception
- If failed to initialize the mechanism
-
getSignatureFactories
- Specified by:
getSignatureFactories
in interfaceSignatureFactoriesHolder
- Returns:
- The list of named
Signature
factories
-
setSignatureFactories
- Specified by:
setSignatureFactories
in interfaceSignatureFactoriesManager
-
getClientUsername
-
setClientUsername
-
getClientHostname
-
setClientHostname
-
sendAuthDataRequest
- Specified by:
sendAuthDataRequest
in classAbstractUserAuth
- Throws:
Exception
-
appendSignature
protected void appendSignature(ClientSession session, String service, String keyType, PublicKey key, byte[] keyBytes, String clientHostname, String clientUsername, Signature verifier, Buffer buffer) throws Exception - Throws:
Exception
-
processAuthDataRequest
protected boolean processAuthDataRequest(ClientSession session, String service, Buffer buffer) throws Exception - Specified by:
processAuthDataRequest
in classAbstractUserAuth
- Throws:
Exception
-
resolveClientUsername
-
resolveClientHostname
-