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, statelogCLOSE_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, removeCloseFutureListenergetSimplifiedLoggerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddCloseFutureListener, close, close, close, getMaxCloseWaitTime, isClosed, isClosing, isOpen, removeCloseFutureListenerprivate 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 ServicegetSession in interface SessionHolder<ClientSession>public ClientSession getClientSession()
getClientSession in interface ClientSessionHolderClientSession usedpublic AuthFuture auth(java.lang.String service) throws java.io.IOException
java.io.IOExceptionpublic void process(int cmd,
Buffer buffer)
throws java.lang.Exception
Serviceprotected void processUserAuth(Buffer buffer) throws java.lang.Exception
buffer - The input Bufferjava.lang.Exception - If failed to processprotected void tryNext(int cmd)
throws java.lang.Exception
java.lang.Exceptionprotected void preClose()
AbstractCloseablepreClose in class AbstractCloseable