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.
-
Field Summary
Fields inherited from interface NamedResource
BY_NAME_COMPARATOR, NAME_EXTRACTOR -
Method Summary
Methods inherited from interface NamedResource
getNameMethods inherited from interface ServerSessionHolder
getServerSessionMethods inherited from interface UserAuthInstance
getSessionMethods inherited from interface UsernameHolder
getUsername
-
Method Details
-
auth
Boolean auth(ServerSession session, String username, String service, Buffer buffer) throws AsyncAuthException, Exception Try 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.- 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:
AsyncAuthException- if the service is willing to perform an asynchronous authenticationException- if the authentication fails
-
next
Handle another step in the authentication process.- Parameters:
buffer- the request buffer containing parameters specific to this request- Returns:
trueif the authentication succeeded,falseif the authentication failed andnullif 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.
-