public abstract class LDAPCheckBase extends java.lang.Object implements LDAPCheckInterface
com.highqsoft.avalon.LDAPCheckInterface.
It is controlled by netries comming from the the bundle
com/highqsoft/ldap/LDAPConfig.
A public LDAP Browser
can be useful to analize the directory structure.
| Property Keyword | Datatype | Default | Description |
|---|---|---|---|
| Service | String | null | The URL of the LDAP service. Example: ldap://pksldap.tttc.de:389 |
| OrgUnit | String | null | The directory where the pattern may be found. Example: ou=TTC Test CA 12:PN,o=Deutsche Telekom AG,c=DE |
| Encryption | String | null | The method that should be used to encrypt the passwird.
If this value is not available the password will not be encrypted. Example: MD5 or SHA |
| Pattern | String | cn=*{0}* | The search pattern. The first arguments is user, the second the password and third the service name. Every parameter can be omitted. Example: cn=*{0}*,userPassword={1},servicename={2} |
LDAPCheckInterface,
com.highqsoft.ldap.LDAPCheckBase| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
BUNDLE |
static java.lang.String |
INITCTX |
static java.lang.String |
SPACE |
| Constructor and Description |
|---|
LDAPCheckBase()
Create the object.
|
| Modifier and Type | Method and Description |
|---|---|
abstract java.lang.String |
checkAttributes(java.util.HashMap<java.lang.String,java.lang.String> map,
java.lang.String service,
javax.naming.directory.Attributes attrs)
Check the attributes and return the authentication string.
|
java.lang.String |
checkAuth(java.lang.String auth,
java.lang.String factory)
Check the authentication
|
abstract NameValue[] |
checkAuthNameValue(NameValue[] nvauth,
java.lang.String factory)
Check the authentication namevalue array at the LDAP Server.
|
void |
close()
Close the LDAP context.
|
void |
init(java.lang.String factory)
No initialization needed.
|
static int |
printAttributes(javax.naming.directory.Attributes attrs)
Print the attributes.
|
public static java.lang.String SPACE
public static final java.lang.String INITCTX
public static final java.lang.String BUNDLE
public void init(java.lang.String factory)
init in interface LDAPCheckInterfacefactory - the name of the factory or servicepublic java.lang.String checkAuth(java.lang.String auth,
java.lang.String factory)
throws AoException
checkAuth in interface LDAPCheckInterfaceauth - the authentication string.factory - the service name.AoExceptionpublic abstract NameValue[] checkAuthNameValue(NameValue[] nvauth, java.lang.String factory) throws AoException
checkAuthNameValue in interface LDAPCheckInterfacenvauth - the authentication namevalue arrayfactory - the name of the factory or serviceAoExceptionpublic void close()
close in interface LDAPCheckInterfacepublic abstract java.lang.String checkAttributes(java.util.HashMap<java.lang.String,java.lang.String> map,
java.lang.String service,
javax.naming.directory.Attributes attrs)
throws javax.naming.NamingException
map - the map containing the incoming authentication entries.service - the name of the service.attrs - the attributes of the found LDAP entry.javax.naming.NamingExceptionpublic static int printAttributes(javax.naming.directory.Attributes attrs)
throws javax.naming.NamingException
attrs - the attributesjavax.naming.NamingException