Class UserAuthPublicKey
java.lang.Object
org.apache.sshd.common.util.logging.AbstractLoggingBean
org.apache.sshd.client.auth.AbstractUserAuth
org.apache.sshd.client.auth.pubkey.UserAuthPublicKey
- All Implemented Interfaces:
UserAuth,ClientSessionHolder,UserAuthInstance<ClientSession>,NamedResource,SignatureFactoriesHolder,SignatureFactoriesManager
Implements the "publickey" authentication mechanism
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected PublicKeyIdentityprotected List<NamedFactory<Signature>>protected Iterator<PublicKeyIdentity>static final StringFields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
logFields inherited from interface org.apache.sshd.common.NamedResource
BY_NAME_COMPARATOR, NAME_EXTRACTOR -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidappendSignature(ClientSession session, String service, String name, String username, String algo, PublicKey key, Buffer buffer) voiddestroy()Called to release any allocated resourcesvoidinit(ClientSession session, String service) protected booleanprocessAuthDataRequest(ClientSession session, String service, Buffer buffer) protected voidprotected booleansendAuthDataRequest(ClientSession session, String service) voidsetSignatureFactories(List<NamedFactory<Signature>> factories) Methods inherited from class org.apache.sshd.client.auth.AbstractUserAuth
getClientSession, getName, getService, getSession, process, toStringMethods 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, warnMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.sshd.common.signature.SignatureFactoriesHolder
getSignatureFactoriesNameList, getSignatureFactoriesNamesMethods inherited from interface org.apache.sshd.common.signature.SignatureFactoriesManager
setSignatureFactoriesNameList, setSignatureFactoriesNames, setSignatureFactoriesNames
-
Field Details
-
NAME
- See Also:
-
keys
-
current
-
factories
-
-
Constructor Details
-
UserAuthPublicKey
public UserAuthPublicKey() -
UserAuthPublicKey
-
-
Method Details
-
getSignatureFactories
- Specified by:
getSignatureFactoriesin interfaceSignatureFactoriesHolder- Returns:
- The list of named
Signaturefactories
-
setSignatureFactories
- Specified by:
setSignatureFactoriesin interfaceSignatureFactoriesManager
-
init
- Specified by:
initin interfaceUserAuth- Overrides:
initin classAbstractUserAuth- Parameters:
session- TheClientSessionservice- The requesting service name- Throws:
Exception- If failed to initialize the mechanism
-
sendAuthDataRequest
- Specified by:
sendAuthDataRequestin classAbstractUserAuth- Throws:
Exception
-
processAuthDataRequest
protected boolean processAuthDataRequest(ClientSession session, String service, Buffer buffer) throws Exception - Specified by:
processAuthDataRequestin classAbstractUserAuth- Throws:
Exception
-
appendSignature
protected void appendSignature(ClientSession session, String service, String name, String username, String algo, PublicKey key, Buffer buffer) throws Exception - Throws:
Exception
-
destroy
public void destroy()Description copied from interface:UserAuthCalled to release any allocated resources- Specified by:
destroyin interfaceUserAuth- Overrides:
destroyin classAbstractUserAuth
-
releaseKeys
- Throws:
IOException
-