public abstract class AbstractUserAuth extends AbstractLoggingBean implements UserAuth
| Modifier and Type | Field and Description |
|---|---|
private ClientSession |
clientSession |
private java.lang.String |
name |
private java.lang.String |
service |
logBY_NAME_COMPARATOR, NAME_EXTRACTOR| Modifier | Constructor and Description |
|---|---|
protected |
AbstractUserAuth(java.lang.String name) |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
Called to release any allocated resources
|
ClientSession |
getClientSession() |
java.lang.String |
getName() |
java.lang.String |
getService() |
ClientSession |
getSession() |
void |
init(ClientSession session,
java.lang.String service) |
boolean |
process(Buffer buffer) |
protected abstract boolean |
processAuthDataRequest(ClientSession session,
java.lang.String service,
Buffer buffer) |
protected abstract boolean |
sendAuthDataRequest(ClientSession session,
java.lang.String service) |
java.lang.String |
toString() |
getSimplifiedLoggerclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitfindByName, getNameList, getNames, ofName, removeByNameprivate final java.lang.String name
private ClientSession clientSession
private java.lang.String service
public ClientSession getClientSession()
getClientSession in interface ClientSessionHolderClientSession usedpublic ClientSession getSession()
getSession in interface UserAuthInstance<ClientSession>null if the instance has not
been initialized yetpublic final java.lang.String getName()
getName in interface NamedResourcepublic java.lang.String getService()
public void init(ClientSession session, java.lang.String service) throws java.lang.Exception
init in interface UserAuthsession - The ClientSessionservice - The requesting service namejava.lang.Exception - If failed to initialize the mechanismpublic boolean process(Buffer buffer) throws java.lang.Exception
process in interface UserAuthbuffer - The Buffer to process - null if not a response buffer,
i.e., the underlying authentication mechanism should initiate whatever challenge/response
mechanism is requiredtrue if request handled - false if the next authentication
mechanism should be usedjava.lang.Exception - If failed to process the requestprotected abstract boolean sendAuthDataRequest(ClientSession session, java.lang.String service) throws java.lang.Exception
java.lang.Exceptionprotected abstract boolean processAuthDataRequest(ClientSession session, java.lang.String service, Buffer buffer) throws java.lang.Exception
java.lang.Exceptionpublic void destroy()
UserAuthpublic java.lang.String toString()
toString in class java.lang.Object