|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.security.ldap.LdapUtils
public final class LdapUtils
LDAP Utility methods.
Method Summary | |
---|---|
static void |
closeContext(Context ctx)
|
static String |
convertPasswordToString(Object passObj)
|
static org.springframework.ldap.core.DistinguishedName |
getFullDn(org.springframework.ldap.core.DistinguishedName dn,
Context baseCtx)
Gets the full dn of a name by prepending the name of the context it is relative to. |
static String |
getRelativeName(String fullDn,
Context baseCtx)
Obtains the part of a DN relative to a supplied base context. |
static byte[] |
getUtf8Bytes(String s)
|
static String |
getUtf8BytesAsString(byte[] utf8)
|
static String |
parseRootDnFromUrl(String url)
Works out the root DN for an LDAP URL. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void closeContext(Context ctx)
public static String getRelativeName(String fullDn, Context baseCtx) throws NamingException
If the DN is "cn=bob,ou=people,dc=springframework,dc=org" and the base context name is "ou=people,dc=springframework,dc=org" it would return "cn=bob".
fullDn
- the DNbaseCtx
- the context to work out the name relative to.
NamingException
- any exceptions thrown by the context are propagated.public static org.springframework.ldap.core.DistinguishedName getFullDn(org.springframework.ldap.core.DistinguishedName dn, Context baseCtx) throws NamingException
NamingException
public static byte[] getUtf8Bytes(String s)
public static String getUtf8BytesAsString(byte[] utf8)
public static String convertPasswordToString(Object passObj)
public static String parseRootDnFromUrl(String url)
For example, the URL ldap://monkeymachine:11389/dc=springframework,dc=org has the root DN "dc=springframework,dc=org".
url
- the LDAP URL
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |