|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.directory.server.ldap.handlers.bind.AbstractSaslCallbackHandler
public abstract class AbstractSaslCallbackHandler
Base class for all SASL CallbackHandlers. Implementations of SASL mechanisms
selectively override the methods relevant to their mechanism.
CallbackHandler| Field Summary | |
|---|---|
protected org.apache.directory.server.core.api.CoreSession |
adminSession
The admin core session |
protected org.apache.directory.shared.ldap.model.message.BindRequest |
bindRequest
The associated BindRequest |
protected org.apache.directory.server.core.api.DirectoryService |
directoryService
A reference on the DirectoryService instance |
protected LdapSession |
ldapSession
The reference on the user ldap session |
| Constructor Summary | |
|---|---|
protected |
AbstractSaslCallbackHandler(org.apache.directory.server.core.api.DirectoryService directoryService,
org.apache.directory.shared.ldap.model.message.BindRequest bindRequest)
Creates a new instance of AbstractSaslCallbackHandler. |
| Method Summary | |
|---|---|
protected abstract void |
authorize(AuthorizeCallback callback)
Final check to authorize user. |
protected LdapContext |
getContext(org.apache.mina.core.session.IoSession session,
org.apache.directory.shared.ldap.model.message.BindRequest bindRequest,
Hashtable<String,Object> env)
Convenience method for acquiring an LdapContext for the client to use for the
duration of a session. |
protected Hashtable<String,Object> |
getEnvironment(org.apache.mina.core.session.IoSession session)
Convenience method for getting an environment suitable for acquiring an LdapContext for the client. |
protected String |
getRealm()
Implementors use this method to access the realm resulting from a callback. |
protected String |
getUsername()
Implementors use this method to access the username resulting from a callback. |
void |
handle(Callback[] callbacks)
SaslServer will use this method to call various callbacks, depending on the SASL mechanism in use for a session. |
protected abstract org.apache.directory.shared.ldap.model.entry.Attribute |
lookupPassword(String username,
String realm)
Implementors set the password based on a lookup, using the username and realm as keys. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected LdapSession ldapSession
protected org.apache.directory.server.core.api.CoreSession adminSession
protected final org.apache.directory.server.core.api.DirectoryService directoryService
protected final org.apache.directory.shared.ldap.model.message.BindRequest bindRequest
| Constructor Detail |
|---|
protected AbstractSaslCallbackHandler(org.apache.directory.server.core.api.DirectoryService directoryService,
org.apache.directory.shared.ldap.model.message.BindRequest bindRequest)
directoryService - | Method Detail |
|---|
protected String getUsername()
NameCallback is not used by GSSAPI.
protected String getRealm()
RealmCallback is not used by GSSAPI nor by CRAM-MD5.
protected abstract org.apache.directory.shared.ldap.model.entry.Attribute lookupPassword(String username,
String realm)
username - The username.realm - The realm.
protected abstract void authorize(AuthorizeCallback callback)
throws Exception
true if authentication was successful.
callback - An AuthorizeCallback.
Exceptionpublic void handle(Callback[] callbacks)
handle in interface CallbackHandlercallbacks - An array of one or more callbacks.
protected LdapContext getContext(org.apache.mina.core.session.IoSession session,
org.apache.directory.shared.ldap.model.message.BindRequest bindRequest,
Hashtable<String,Object> env)
LdapContext for the client to use for the
duration of a session.
session - The current session.bindRequest - The current BindRequest.env - An environment to be used to acquire an LdapContext.
LdapContext for the client.protected Hashtable<String,Object> getEnvironment(org.apache.mina.core.session.IoSession session)
LdapContext for the client.
session - The current session.
LdapContext for the client.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||