Top Description Methods
org.apache.sshd.server.auth

public Interface UserAuth

extends ServerSessionHolder, UserAuthInstance<ServerSession>, UsernameHolder
Known Direct Implementers
org.apache.sshd.server.auth.AbstractUserAuth
Imports
org.apache.sshd.common.auth.UserAuthInstance, .UsernameHolder, org.apache.sshd.common.util.buffer.Buffer, org.apache.sshd.server.session.ServerSession, .ServerSessionHolder

Server side authentication mechanism.
Author
Apache MINA SSHD Project

Method Summary

Modifier and TypeMethod and Description
public Boolean

Returns:

true if the authentication succeeded, false if the authentication failed and null if not finished yet
auth
(ServerSession
the current ServerSession session
session
,
String
the user trying to log in
username
,
String
the requested service name
service
,
Buffer
the request buffer containing parameters specific to this request
buffer
)

Try to authenticate the user.

public void
destroy()

Free any system resources used by the module.

public Boolean

Returns:

true if the authentication succeeded, false if the authentication failed and null if not finished yet
next
(Buffer
the request buffer containing parameters specific to this request
buffer
)

Handle another step in the authentication process.

Inherited from org.apache.sshd.common.auth.UserAuthInstance:
getSession
Inherited from org.apache.sshd.common.auth.UsernameHolder:
getUsername
Inherited from org.apache.sshd.server.session.ServerSessionHolder:
getServerSession

Method Detail

authback to summary
public Boolean auth(ServerSession session, String username, String service, Buffer buffer) throws AsyncAuthException, Exception

Try to authenticate the user. This methods should return a non null value indicating if the authentication succeeded. If the authentication is still ongoing, a null value should be returned.

Parameters
session:ServerSession

the current ServerSession session

username:String

the user trying to log in

service:String

the requested service name

buffer:Buffer

the request buffer containing parameters specific to this request

Returns:Boolean

true if the authentication succeeded, false if the authentication failed and null if not finished yet

Exceptions
AsyncAuthException:
if the service is willing to perform an asynchronous authentication
Exception:
if the authentication fails
destroyback to summary
public void destroy()

Free any system resources used by the module.

nextback to summary
public Boolean next(Buffer buffer) throws AsyncAuthException, Exception

Handle another step in the authentication process.

Parameters
buffer:Buffer

the request buffer containing parameters specific to this request

Returns:Boolean

true if the authentication succeeded, false if the authentication failed and null if not finished yet

Exceptions
AsyncAuthException:
if the service is willing to perform an asynchronous authentication
Exception:
if the authentication fails