public class ClientUserAuthService extends AbstractCloseable implements Service, SessionHolder<ClientSession>, ClientSessionHolder
ssh-auth
service.AbstractCloseable.State
Modifier and Type | Field and Description |
---|---|
private java.util.List<NamedFactory<UserAuth>> |
authFactories |
private java.util.concurrent.atomic.AtomicReference<AuthFuture> |
authFutureHolder
The AuthFuture that is being used by the current auth request.
|
private java.util.List<java.lang.String> |
clientMethods |
private ClientSessionImpl |
clientSession |
private int |
currentMethod |
private java.util.List<java.lang.String> |
serverMethods |
private java.lang.String |
service |
private UserAuth |
userAuth |
closeFuture, lock, state
log
CLOSE_WAIT_TIMEOUT, DEFAULT_CLOSE_WAIT_TIMEOUT
Constructor and Description |
---|
ClientUserAuthService(Session s) |
Modifier and Type | Method and Description |
---|---|
AuthFuture |
auth(java.lang.String service) |
ClientSession |
getClientSession() |
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.
|
void |
start() |
protected void |
tryNext(int cmd) |
addCloseFutureListener, builder, close, doCloseGracefully, doCloseImmediately, isClosed, isClosing, removeCloseFutureListener
getSimplifiedLogger
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addCloseFutureListener, close, close, close, getMaxCloseWaitTime, isClosed, isClosing, isOpen, removeCloseFutureListener
private final java.util.concurrent.atomic.AtomicReference<AuthFuture> authFutureHolder
private final ClientSessionImpl clientSession
private final java.util.List<java.lang.String> clientMethods
private final java.util.List<NamedFactory<UserAuth>> authFactories
private java.lang.String service
private java.util.List<java.lang.String> serverMethods
private UserAuth userAuth
private int currentMethod
public ClientUserAuthService(Session s)
public ClientSession getSession()
getSession
in interface Service
getSession
in interface SessionHolder<ClientSession>
public ClientSession getClientSession()
getClientSession
in interface ClientSessionHolder
ClientSession
usedpublic AuthFuture auth(java.lang.String service) throws java.io.IOException
java.io.IOException
public void process(int cmd, Buffer buffer) throws java.lang.Exception
Service
protected void processUserAuth(Buffer buffer) throws java.lang.Exception
buffer
- The input Buffer
java.lang.Exception
- If failed to processprotected void tryNext(int cmd) throws java.lang.Exception
java.lang.Exception
protected void preClose()
AbstractCloseable
preClose
in class AbstractCloseable