Class ClientUserAuthService
java.lang.Object
org.apache.sshd.common.util.logging.AbstractLoggingBean
org.apache.sshd.common.util.closeable.IoBaseCloseable
org.apache.sshd.common.util.closeable.AbstractCloseable
org.apache.sshd.client.session.ClientUserAuthService
- All Implemented Interfaces:
Closeable, AutoCloseable, Channel, ClientSessionHolder, org.apache.sshd.common.Closeable, org.apache.sshd.common.PropertyResolver, Service, org.apache.sshd.common.session.SessionContextHolder, SessionHolder<Session>
public class ClientUserAuthService
extends org.apache.sshd.common.util.closeable.AbstractCloseable
implements Service, ClientSessionHolder
Client side
ssh-auth service.- Author:
- Apache MINA SSHD Project
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.sshd.common.util.closeable.AbstractCloseable
org.apache.sshd.common.util.closeable.AbstractCloseable.State -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final List<UserAuthFactory> protected final AtomicReference<AuthFuture> The AuthFuture that is being used by the current auth request.protected final ClientSessionImplFields inherited from class org.apache.sshd.common.util.closeable.AbstractCloseable
closeFuture, futureLock, stateFields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
logFields inherited from interface org.apache.sshd.common.PropertyResolver
EMPTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected AuthFuturecreateAuthFuture(ClientSession session, String service) protected voidpreClose()voidprocess(int cmd, org.apache.sshd.common.util.buffer.Buffer buffer) Service the request.protected voidprocessUserAuth(int cmd, org.apache.sshd.common.util.buffer.Buffer buffer, AuthFuture authFuture) Execute one step in user authentication.protected org.apache.sshd.common.io.IoWriteFuturesendInitialAuthRequest(ClientSession session, String service) voidstart()protected voidtryNext(int cmd, AuthFuture authFuture) protected AuthFutureupdateCurrentAuthFuture(ClientSession session, String service) Methods inherited from class org.apache.sshd.common.util.closeable.AbstractCloseable
addCloseFutureListener, builder, close, doCloseGracefully, doCloseImmediately, getFutureLock, isClosed, isClosing, removeCloseFutureListenerMethods 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 Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.sshd.common.Closeable
addCloseFutureListener, close, close, isClosed, isClosing, isOpen, removeCloseFutureListenerMethods inherited from interface org.apache.sshd.common.PropertyResolver
getBoolean, getBooleanProperty, getCharset, getInteger, getIntProperty, getLong, getLongProperty, getObject, getString, getStringProperty, isEmptyMethods inherited from interface Service
getParentPropertyResolverMethods inherited from interface SessionHolder
getSessionContext
-
Field Details
-
authFutureHolder
The AuthFuture that is being used by the current auth request. It is set while an authentication is ongoing. -
clientSession
-
authFactories
-
clientMethods
-
serverMethods
-
-
Constructor Details
-
ClientUserAuthService
-
-
Method Details
-
getSession
- Specified by:
getSessionin interfaceSessionHolder<Session>
-
getClientSession
- Specified by:
getClientSessionin interfaceClientSessionHolder- Returns:
- The underlying
ClientSessionused
-
getProperties
-
start
-
getCurrentServiceName
-
auth
- Throws:
IOException
-
updateCurrentAuthFuture
protected AuthFuture updateCurrentAuthFuture(ClientSession session, String service) throws IOException - Throws:
IOException
-
createAuthFuture
- Throws:
IOException
-
sendInitialAuthRequest
protected org.apache.sshd.common.io.IoWriteFuture sendInitialAuthRequest(ClientSession session, String service) throws IOException - Throws:
IOException
-
process
Description copied from interface:ServiceService the request. -
processUserAuth
protected void processUserAuth(int cmd, org.apache.sshd.common.util.buffer.Buffer buffer, AuthFuture authFuture) throws Exception Execute one step in user authentication.- Parameters:
cmd- the commandbuffer- the inputBuffer, with the reading position after the command byteauthFuture- theAuthFuture- Throws:
Exception- If failed to process
-
tryNext
- Throws:
Exception
-
preClose
protected void preClose()- Overrides:
preClosein classorg.apache.sshd.common.util.closeable.AbstractCloseable
-