public class ClientUserAuthService extends AbstractCloseable implements Service, ClientSessionHolder
ssh-auth
service.AbstractCloseable.State
Modifier and Type | Field and Description |
---|---|
protected List<UserAuthFactory> |
authFactories |
protected AtomicReference<AuthFuture> |
authFutureHolder
The AuthFuture that is being used by the current auth request.
|
protected List<String> |
clientMethods |
protected ClientSessionImpl |
clientSession |
protected List<String> |
serverMethods |
closeFuture, futureLock, state
log
EMPTY
Constructor and Description |
---|
ClientUserAuthService(Session s) |
Modifier and Type | Method and Description |
---|---|
AuthFuture |
auth(String service) |
protected AuthFuture |
createAuthFuture(ClientSession session,
String service) |
ClientSession |
getClientSession() |
String |
getCurrentServiceName() |
Map<String,Object> |
getProperties()
A map of properties that can be used to configure the SSH server or client.
|
ClientSession |
getSession() |
protected void |
preClose()
preClose is guaranteed to be called before doCloseGracefully or doCloseImmediately.
|
void |
process(int cmd,
Buffer buffer)
Service the request.
|
protected void |
processUserAuth(Buffer buffer)
Execute one step in user authentication.
|
protected IoWriteFuture |
sendInitialAuthRequest(ClientSession session,
String service) |
void |
start() |
protected void |
tryNext(int cmd) |
protected AuthFuture |
updateCurrentAuthFuture(ClientSession session,
String service) |
addCloseFutureListener, builder, close, doCloseGracefully, doCloseImmediately, getFutureLock, isClosed, isClosing, removeCloseFutureListener
debug, debug, debug, debug, debug, error, error, error, error, error, getSimplifiedLogger, info, info, warn, warn, warn, warn, warn, warn, warn, warn
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getParentPropertyResolver
getSessionContext
getBoolean, getBooleanProperty, getCharset, getInteger, getIntProperty, getLong, getLongProperty, getObject, getString, getStringProperty, isEmpty, isEmpty
addCloseFutureListener, close, close, close, getMaxCloseWaitTime, isClosed, isClosing, isOpen, removeCloseFutureListener
protected final AtomicReference<AuthFuture> authFutureHolder
protected final ClientSessionImpl clientSession
protected final List<UserAuthFactory> authFactories
public ClientUserAuthService(Session s)
public ClientSession getSession()
getSession
in interface SessionHolder<Session>
public ClientSession getClientSession()
getClientSession
in interface ClientSessionHolder
ClientSession
usedpublic Map<String,Object> getProperties()
PropertyResolver
A map of properties that can be used to configure the SSH server or client. This map will never be changed by either the server or client and is not supposed to be changed at runtime (changes are not bound to have any effect on a running client or server), though it may affect the creation of sessions later as these values are usually not cached.
Note: the type of the mapped property should match the expected configuration value type -
Long, Integer, Boolean,
String
, etc.... If it doesn't, the toString()
result of the mapped value is used to convert it to the
required type. E.g., if the mapped value is the string "1234" and the expected value is a
long
then it will be parsed into one. Also, if the mapped value is an Integer
but a long
is expected, then it will be converted into one.
getProperties
in interface PropertyResolver
Map
containing configuration values, never null
. Note: may be
immutable.public String getCurrentServiceName()
public AuthFuture auth(String service) throws IOException
IOException
protected AuthFuture updateCurrentAuthFuture(ClientSession session, String service) throws IOException
IOException
protected AuthFuture createAuthFuture(ClientSession session, String service) throws IOException
IOException
protected IoWriteFuture sendInitialAuthRequest(ClientSession session, String service) throws IOException
IOException
public void process(int cmd, Buffer buffer) throws Exception
Service
protected void processUserAuth(Buffer buffer) throws Exception
protected void preClose()
AbstractCloseable
preClose
in class AbstractCloseable
Copyright © 2008–2024 The Apache Software Foundation. All rights reserved.