Package org.apache.sshd.server.auth
Interface UserAuth
-
- All Superinterfaces:
NamedResource
,ServerSessionHolder
,UserAuthInstance<ServerSession>
,UsernameHolder
- All Known Implementing Classes:
AbstractUserAuth
,UserAuthGSS
,UserAuthHostBased
,UserAuthKeyboardInteractive
,UserAuthNone
,UserAuthPassword
,UserAuthPublicKey
public interface UserAuth extends ServerSessionHolder, UserAuthInstance<ServerSession>, UsernameHolder
Server side authentication mechanism.- Author:
- Apache MINA SSHD Project
-
-
Field Summary
-
Fields inherited from interface org.apache.sshd.common.NamedResource
BY_NAME_COMPARATOR, NAME_EXTRACTOR
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Boolean
auth(ServerSession session, String username, String service, Buffer buffer)
Try to authenticate the user.void
destroy()
Free any system resources used by the module.Boolean
next(Buffer buffer)
Handle another step in the authentication process.-
Methods inherited from interface org.apache.sshd.common.NamedResource
getName
-
Methods inherited from interface org.apache.sshd.server.session.ServerSessionHolder
getServerSession
-
Methods inherited from interface org.apache.sshd.common.auth.UserAuthInstance
getSession
-
Methods inherited from interface org.apache.sshd.common.auth.UsernameHolder
getUsername
-
-
-
-
Method Detail
-
auth
Boolean auth(ServerSession session, String username, String service, Buffer buffer) throws AsyncAuthException, Exception
Try to authenticate the user. This methods should return a nonnull
value indicating if the authentication succeeded. If the authentication is still ongoing, anull
value should be returned.- Parameters:
session
- the currentServerSession
sessionusername
- the user trying to log inservice
- the requested service namebuffer
- the request buffer containing parameters specific to this request- Returns:
true
if the authentication succeeded,false
if the authentication failed andnull
if not finished yet- Throws:
AsyncAuthException
- if the service is willing to perform an asynchronous authenticationException
- if the authentication fails
-
next
Boolean next(Buffer buffer) throws AsyncAuthException, Exception
Handle another step in the authentication process.- Parameters:
buffer
- the request buffer containing parameters specific to this request- Returns:
true
if the authentication succeeded,false
if the authentication failed andnull
if not finished yet- Throws:
AsyncAuthException
- if the service is willing to perform an asynchronous authenticationException
- if the authentication fails
-
destroy
void destroy()
Free any system resources used by the module.
-
-