Package org.opends.server.extensions
Class SASLContext
- java.lang.Object
-
- org.opends.server.extensions.SASLContext
-
- All Implemented Interfaces:
PrivilegedExceptionAction<Boolean>,CallbackHandler
public class SASLContext extends Object implements CallbackHandler, PrivilegedExceptionAction<Boolean>
This class defines the SASL context needed to process GSSAPI and DIGEST-MD5 bind requests from clients.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SASLContextcreateSASLContext(HashMap<String,String> saslProps, String serverFQDN, String mechanism, IdentityMapper<?> identityMapper)Instantiate a GSSAPI/DIGEST-MD5 SASL context using the specified parameters.voidhandle(Callback[] callbacks)Process the specified callback array.Booleanrun()The method performs all GSSAPI processing.
-
-
-
Method Detail
-
createSASLContext
public static SASLContext createSASLContext(HashMap<String,String> saslProps, String serverFQDN, String mechanism, IdentityMapper<?> identityMapper) throws SaslException
Instantiate a GSSAPI/DIGEST-MD5 SASL context using the specified parameters.- Parameters:
saslProps- The properties to use in creating the SASL server.serverFQDN- The fully qualified domain name to use in creating the SASL server.mechanism- The SASL mechanism name.identityMapper- The identity mapper to use in mapping identities.- Returns:
- A fully instantiated SASL context to use in processing a SASL bind for the GSSAPI or DIGEST-MD5 mechanisms.
- Throws:
SaslException- If the SASL server can not be instantiated.
-
handle
public void handle(Callback[] callbacks) throws UnsupportedCallbackException
Process the specified callback array.- Specified by:
handlein interfaceCallbackHandler- Parameters:
callbacks- An array of callbacks that need processing.- Throws:
UnsupportedCallbackException- If a callback is not supported.
-
run
public Boolean run()
The method performs all GSSAPI processing. It is run as the context of the login context performed by the GSSAPI mechanism handler. See comments for processing overview.- Specified by:
runin interfacePrivilegedExceptionAction<Boolean>- Returns:
trueif the authentication processing was successful.
-
-