public abstract class AbstractUserAuth extends java.lang.Object implements UserAuth
| Modifier and Type | Field and Description |
|---|---|
protected org.slf4j.Logger |
log |
protected java.lang.String |
service |
protected ServerSession |
session |
protected java.lang.String |
username |
| Constructor and Description |
|---|
AbstractUserAuth() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Boolean |
auth(ServerSession session,
java.lang.String username,
java.lang.String service,
Buffer buffer)
Try to authenticate the user.
|
void |
destroy()
Free any system resources used by the module.
|
protected abstract java.lang.Boolean |
doAuth(Buffer buffer,
boolean init) |
java.lang.String |
getService() |
java.lang.String |
getUserName()
Get a user name which has been derived from the handshaking process, or the initial name if
nothing has been found.
|
java.lang.Boolean |
next(Buffer buffer)
Handle another step in the authentication process.
|
protected final org.slf4j.Logger log
protected ServerSession session
protected java.lang.String service
protected java.lang.String username
public java.lang.String getUserName()
UserAuthgetUserName in interface UserAuthpublic java.lang.String getService()
public java.lang.Boolean auth(ServerSession session, java.lang.String username, java.lang.String service, Buffer buffer) throws java.lang.Exception
UserAuthauth in interface UserAuthsession - the current ssh sessionusername - the user trying to log inbuffer - the request buffer containing parameters specific to this requesttrue if the authentication succeeded, false if the authentication
failed and nullis not finished yetjava.lang.Exception - if the authentication failspublic java.lang.Boolean next(Buffer buffer) throws java.lang.Exception
UserAuthpublic void destroy()
UserAuthprotected abstract java.lang.Boolean doAuth(Buffer buffer, boolean init) throws java.lang.Exception
java.lang.ExceptionCopyright © 2008-2014 The Apache Software Foundation. All Rights Reserved.