public abstract class AbstractUserAuth extends AbstractLoggingBean implements UserAuth
NamedResource.Utils
log
BY_NAME_COMPARATOR, NAME_EXTRACTOR
Modifier | Constructor and Description |
---|---|
protected |
AbstractUserAuth(String name) |
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Called to release any allocated resources
|
ClientSession |
getClientSession() |
String |
getName() |
String |
getService() |
ClientSession |
getSession() |
void |
init(ClientSession session,
String service) |
boolean |
process(Buffer buffer) |
protected abstract boolean |
processAuthDataRequest(ClientSession session,
String service,
Buffer buffer) |
protected abstract boolean |
sendAuthDataRequest(ClientSession session,
String service) |
String |
toString() |
protected AbstractUserAuth(String name)
public ClientSession getClientSession()
getClientSession
in interface ClientSessionHolder
ClientSession
usedpublic ClientSession getSession()
getSession
in interface UserAuthInstance<ClientSession>
null
if the instance has not
been initialized yetpublic final String getName()
getName
in interface NamedResource
public String getService()
public void init(ClientSession session, String service) throws Exception
init
in interface UserAuth
session
- The ClientSession
service
- The requesting service nameException
- If failed to initialize the mechanismpublic boolean process(Buffer buffer) throws Exception
process
in interface UserAuth
buffer
- 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 usedException
- If failed to process the requestprotected abstract boolean sendAuthDataRequest(ClientSession session, String service) throws Exception
Exception
protected abstract boolean processAuthDataRequest(ClientSession session, String service, Buffer buffer) throws Exception
Exception
public void destroy()
UserAuth
Copyright © 2008–2016 The Apache Software Foundation. All rights reserved.