|
Spring LDAP | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ContextSource
A ContextSource
is responsible for configuring and creating
DirContext
instances. It is typically used from
LdapTemplate
to acquiring contexts for LDAP operations, but may be
used standalone to perform LDAP authentication.
LdapTemplate
Method Summary | |
---|---|
DirContext |
getContext(String principal,
String credentials)
Gets a DirContext instance authenticated using the supplied
principal and credentials. |
DirContext |
getReadOnlyContext()
Gets a read-only DirContext . |
DirContext |
getReadWriteContext()
Gets a read-write DirContext instance. |
Method Detail |
---|
DirContext getReadOnlyContext() throws NamingException
DirContext
. The returned
DirContext
must be possible to perform read-only operations
on.
NamingException
- if some error occurs creating an DirContext.DirContext getReadWriteContext() throws NamingException
DirContext
instance.
DirContext
instance, never null
.
NamingException
- if some error occurs creating an
DirContext
.DirContext getContext(String principal, String credentials) throws NamingException
DirContext
instance authenticated using the supplied
principal and credentials. Typically to be used for plain authentication
purposes. Note that this method will never make use
of native Java LDAP pooling, even though this instance is configured to do so.
This is to force password changes in the target directory to take effect
as soon as possible.
principal
- The principal (typically a distinguished name of a user
in the LDAP tree) to use for authentication.credentials
- The credentials to use for authentication.
DirContext
instance, never
null
.
NamingException
|
Spring LDAP | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |