public class UserAuthPublicKey extends AbstractUserAuth implements SignatureFactoriesManager
| Modifier and Type | Field and Description |
|---|---|
protected String |
chosenAlgorithm |
protected PublicKeyIdentity |
current |
protected Deque<String> |
currentAlgorithms |
protected List<NamedFactory<Signature>> |
factories |
protected Iterator<PublicKeyIdentity> |
keys |
static String |
NAME |
logBY_NAME_COMPARATOR, NAME_EXTRACTOR| Constructor and Description |
|---|
UserAuthPublicKey() |
UserAuthPublicKey(List<NamedFactory<Signature>> factories) |
| Modifier and Type | Method and Description |
|---|---|
protected byte[] |
appendSignature(ClientSession session,
String service,
String name,
String username,
String algo,
PublicKey key,
Buffer buffer) |
void |
destroy()
Called to release any allocated resources
|
List<NamedFactory<Signature>> |
getSignatureFactories() |
void |
init(ClientSession session,
String service) |
protected boolean |
processAuthDataRequest(ClientSession session,
String service,
Buffer buffer) |
protected void |
releaseKeys() |
protected PublicKeyIdentity |
resolveAttemptedPublicKeyIdentity(ClientSession session,
String service) |
protected boolean |
sendAuthDataRequest(ClientSession session,
String service) |
void |
setSignatureFactories(List<NamedFactory<Signature>> factories) |
void |
signalAuthMethodFailure(ClientSession session,
String service,
boolean partial,
List<String> serverMethods,
Buffer buffer)
Signals reception of
SSH_MSG_USERAUTH_FAILURE message |
void |
signalAuthMethodSuccess(ClientSession session,
String service,
Buffer buffer)
Signal reception of
SSH_MSG_USERAUTH_SUCCESS message |
getClientSession, getName, getService, getSession, process, toStringdebug, debug, debug, debug, debug, error, error, error, error, error, getSimplifiedLogger, info, info, warn, warn, warn, warn, warn, warn, warn, warnclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetSignatureFactories, resolveSignatureFactories, setSignatureFactoriesNameList, setSignatureFactoriesNames, setSignatureFactoriesNamesgetSignatureFactoriesNameList, getSignatureFactoriesNamesfindByName, findFirstMatchByName, getNameList, getNames, ofName, removeByName, safeCompareByNamepublic static final String NAME
protected Iterator<PublicKeyIdentity> keys
protected PublicKeyIdentity current
protected List<NamedFactory<Signature>> factories
protected String chosenAlgorithm
public UserAuthPublicKey()
public UserAuthPublicKey(List<NamedFactory<Signature>> factories)
public List<NamedFactory<Signature>> getSignatureFactories()
getSignatureFactories in interface SignatureFactoriesHolderpublic void setSignatureFactories(List<NamedFactory<Signature>> factories)
setSignatureFactories in interface SignatureFactoriesManagerpublic void init(ClientSession session, String service) throws Exception
init in interface UserAuthinit in class AbstractUserAuthsession - The ClientSessionservice - The requesting service nameException - If failed to initialize the mechanismprotected boolean sendAuthDataRequest(ClientSession session, String service) throws Exception
sendAuthDataRequest in class AbstractUserAuthExceptionprotected PublicKeyIdentity resolveAttemptedPublicKeyIdentity(ClientSession session, String service) throws Exception
Exceptionprotected boolean processAuthDataRequest(ClientSession session, String service, Buffer buffer) throws Exception
processAuthDataRequest in class AbstractUserAuthExceptionprotected byte[] appendSignature(ClientSession session, String service, String name, String username, String algo, PublicKey key, Buffer buffer) throws Exception
Exceptionpublic void signalAuthMethodSuccess(ClientSession session, String service, Buffer buffer) throws Exception
UserAuthSSH_MSG_USERAUTH_SUCCESS messagesignalAuthMethodSuccess in interface UserAuthsession - The ClientSessionservice - The requesting service namebuffer - The Buffer containing the success message (after having consumed the relevant data from
it)Exception - If failed to handle the callback - Note: may cause session closepublic void signalAuthMethodFailure(ClientSession session, String service, boolean partial, List<String> serverMethods, Buffer buffer) throws Exception
UserAuthSSH_MSG_USERAUTH_FAILURE messagesignalAuthMethodFailure in interface UserAuthsession - The ClientSessionservice - The requesting service namepartial - true if some partial authentication success so farserverMethods - The List of authentication methods that can continuebuffer - The Buffer containing the failure message (after having consumed the relevant data
from it)Exception - If failed to handle the callback - Note: may cause session closepublic void destroy()
UserAuthdestroy in interface UserAuthdestroy in class AbstractUserAuthprotected void releaseKeys()
throws IOException
IOExceptionCopyright © 2008–2021 The Apache Software Foundation. All rights reserved.