public class DigestMd5DirContextAuthenticationStrategy extends Object implements DirContextAuthenticationStrategy
Constructor and Description |
---|
DigestMd5DirContextAuthenticationStrategy() |
Modifier and Type | Method and Description |
---|---|
DirContext |
processContextAfterCreation(DirContext ctx,
String userDn,
String password)
This method is responsible for post-processing the
DirContext instance after it has been created. |
void |
setupEnvironment(Hashtable<String,Object> env,
String userDn,
String password)
This method is responsible for preparing the environment to be used when
creating the
DirContext instance. |
public DigestMd5DirContextAuthenticationStrategy()
public DirContext processContextAfterCreation(DirContext ctx, String userDn, String password)
DirContextAuthenticationStrategy
DirContext
instance after it has been created. It will be
called immediately after the instance has been created. Some
authentication mechanisms, e.g. TLS, require particular stuff to happen
before the actual target Context is closed. This method provides the
possibility to replace or wrap the actual DirContext with a proxy so that
any calls on it may be intercepted.processContextAfterCreation
in interface DirContextAuthenticationStrategy
ctx
- the freshly created DirContext
instance. The
actual implementation class (e.g. InitialLdapContext
)
depends on the ContextSource
implementation.userDn
- the user DN to authenticate, as received from the
AuthenticationSource
of the ContextSource
.password
- the password to authenticate with, as received from the
AuthenticationSource
of the ContextSource
.public void setupEnvironment(Hashtable<String,Object> env, String userDn, String password)
DirContextAuthenticationStrategy
DirContext
instance. The base environment
(including URL, ContextFactory
etc. will already be set,
and this method is called just before the actual Context is to be
created.setupEnvironment
in interface DirContextAuthenticationStrategy
env
- The Hashtable
to be sent to the
DirContext
instance on initialization. Pre-configured with
the basic settings; the implementation of this method is responsible for
manipulating the environment as appropriate for the particular
authentication mechanism.userDn
- the user DN to authenticate, as received from the
AuthenticationSource
of the ContextSource
.password
- the password to authenticate with, as received from the
AuthenticationSource
of the ContextSource
.