public abstract class AbstractUserAuth extends Object implements UserAuth
| Modifier and Type | Field and Description |
|---|---|
protected org.slf4j.Logger |
log |
protected String |
service |
protected ServerSession |
session |
protected String |
username |
| Constructor and Description |
|---|
AbstractUserAuth() |
| Modifier and Type | Method and 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.
|
protected abstract Boolean |
doAuth(Buffer buffer,
boolean init) |
String |
getService() |
String |
getUserName()
Get a user name which has been derived from the handshaking process, or the initial name if
nothing has been found.
|
Boolean |
next(Buffer buffer)
Handle another step in the authentication process.
|
protected final org.slf4j.Logger log
protected ServerSession session
protected String service
protected String username
public String getUserName()
UserAuthgetUserName in interface UserAuthpublic String getService()
public Boolean auth(ServerSession session, String username, String service, Buffer buffer) throws 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 null if not finished yetException - if the authentication failspublic Boolean next(Buffer buffer) throws Exception
UserAuthpublic void destroy()
UserAuthCopyright © 2008–2015 The Apache Software Foundation. All rights reserved.