|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object issrg.dis.LDAPUtility
public class LDAPUtility
Field Summary | |
---|---|
static java.lang.String |
AC_attribute
The variable, containing the name of the attribute the LDAPSavingUtility will retrieve and store. |
Constructor Summary | |
---|---|
LDAPUtility(java.lang.String LDAPServer,
java.lang.String rootDN,
java.lang.String rootPass,
Level level)
This is the constructor for the LDAPUtility object. |
Method Summary | |
---|---|
boolean |
authenticate(java.lang.String key,
java.lang.String user,
java.lang.String pass)
This method authenticates the user by his key. |
boolean |
authenticateUser(java.lang.String userDN,
java.lang.String pass)
This function is used to authenticate a pair user/password against information stored in LDAP |
void |
deleteAC(java.lang.String dn,
int idx)
Delete AC (Attribute Certificate) from the specified entry and index |
void |
deleteAllACs(java.lang.String dn)
Delete all ACs (Attribute Certificate from the specified entry |
javax.naming.directory.DirContext[] |
getLdaps()
This method returns the LDAPRepository |
javax.naming.directory.Attribute |
loadACs(java.lang.String dn)
Load all ACs (Attribute Certificate) from the specified entry. |
void |
save(byte[] ac)
This method saves an AC of a specific user to LDAP |
java.lang.String |
searchUser(java.lang.String key,
java.lang.String user)
This function is used to search one user in the current LDAP server. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String AC_attribute
Constructor Detail |
---|
public LDAPUtility(java.lang.String LDAPServer, java.lang.String rootDN, java.lang.String rootPass, Level level)
LDAPServer
- is the URL of the LDAP serverrootDN
- is the DN of the administrator of that LDAP serverrootPass
- is the password of the administrator of the LDAP serverlevel
- is the debuging levelMethod Detail |
---|
public boolean authenticateUser(java.lang.String userDN, java.lang.String pass)
userDN
- is the user's DNpass
- is the password of the above user
Note that only simple authentication is supported at the moment.
public boolean authenticate(java.lang.String key, java.lang.String user, java.lang.String pass)
user
- - the userkey
- is the key that used for seaching the user (uid as an example)pass
- - the password of the user
public java.lang.String searchUser(java.lang.String key, java.lang.String user)
userUID
- is the UID of the user in LDAP serverkey
- is a string that used to define the scope of the seach process
public javax.naming.directory.DirContext[] getLdaps()
public void save(byte[] ac) throws java.lang.Exception
save
in interface DISCore.Repository
ac
- is the AC of a user
The method can throw an exception if it can not save the AC to
user's entry in LDAP
java.lang.Exception
public javax.naming.directory.Attribute loadACs(java.lang.String dn) throws java.lang.Exception
loadACs
in interface DISCore.Repository
dn
- the specifed a holder's DN that you want to retrive ACs.
java.lang.Exception
public void deleteAC(java.lang.String dn, int idx) throws java.lang.Exception
deleteAC
in interface DISCore.Repository
dn
- the user's DNidx
- the specified index. The AC in this position will be deleted
java.lang.Exception
public void deleteAllACs(java.lang.String dn) throws java.lang.Exception
deleteAllACs
in interface DISCore.Repository
dn
- is the specified entry. All ACs in this entry will be deleted
java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |