Class AbstractUserAuth
java.lang.Object
org.apache.sshd.common.util.logging.AbstractLoggingBean
org.apache.sshd.server.auth.AbstractUserAuth
- All Implemented Interfaces:
org.apache.sshd.common.auth.UserAuthInstance<ServerSession>, org.apache.sshd.common.auth.UsernameHolder, org.apache.sshd.common.NamedResource, UserAuth, ServerSessionHolder
- Direct Known Subclasses:
UserAuthGSS, UserAuthHostBased, UserAuthKeyboardInteractive, UserAuthNone, UserAuthPassword, UserAuthPublicKey
public abstract class AbstractUserAuth
extends org.apache.sshd.common.util.logging.AbstractLoggingBean
implements UserAuth
- Author:
- Apache MINA SSHD Project
-
Field Summary
Fields inherited from class org.apache.sshd.common.util.logging.AbstractLoggingBean
logFields inherited from interface org.apache.sshd.common.NamedResource
BY_NAME_COMPARATOR, NAME_EXTRACTOR -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionauth(ServerSession session, String username, String service, org.apache.sshd.common.util.buffer.Buffer buffer) Try to authenticate the user.voiddestroy()Free any system resources used by the module.protected abstract BooleandoAuth(org.apache.sshd.common.util.buffer.Buffer buffer, boolean init) final StringgetName()next(org.apache.sshd.common.util.buffer.Buffer buffer) Handle another step in the authentication process.toString()Methods 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, warn
-
Constructor Details
-
AbstractUserAuth
-
-
Method Details
-
getName
- Specified by:
getNamein interfaceorg.apache.sshd.common.NamedResource
-
getUsername
- Specified by:
getUsernamein interfaceorg.apache.sshd.common.auth.UsernameHolder
-
getService
-
getServerSession
- Specified by:
getServerSessionin interfaceServerSessionHolder- Returns:
- The underlying
ServerSessionused
-
getSession
- Specified by:
getSessionin interfaceorg.apache.sshd.common.auth.UserAuthInstance<ServerSession>
-
auth
public Boolean auth(ServerSession session, String username, String service, org.apache.sshd.common.util.buffer.Buffer buffer) throws Exception Description copied from interface:UserAuthTry to authenticate the user. This methods should return a nonnullvalue indicating if the authentication succeeded. If the authentication is still ongoing, anullvalue should be returned.- Specified by:
authin interfaceUserAuth- Parameters:
session- the currentServerSessionsessionusername- the user trying to log inservice- the requested service namebuffer- the request buffer containing parameters specific to this request- Returns:
trueif the authentication succeeded,falseif the authentication failed andnullif not finished yet- Throws:
Exception- if the authentication fails
-
next
Description copied from interface:UserAuthHandle another step in the authentication process. -
destroy
-
doAuth
-
toString
-