|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.ucsb.nceas.metacat.AuthLdap
An implementation of the AuthInterface interface that allows Metacat to use the LDAP protocol for directory services. The LDAP authentication service is used to determine if a user is authenticated, and whether they are a member of a particular group.
Constructor Summary | |
AuthLdap()
Construct an AuthLdap |
Method Summary | |
boolean |
authenticate(java.lang.String user,
java.lang.String password)
Determine if a user/password are valid according to the authentication service. |
java.util.HashMap |
getAttributes(java.lang.String foruser)
Get attributes describing a user or group |
java.util.HashMap |
getAttributes(java.lang.String user,
java.lang.String password,
java.lang.String foruser)
Get attributes describing a user or group |
java.lang.String[] |
getGroups(java.lang.String user,
java.lang.String password)
Get all groups from the authentication service |
java.lang.String[] |
getGroups(java.lang.String user,
java.lang.String password,
java.lang.String foruser)
Get the groups for a particular user from the authentication service |
java.lang.String |
getPrincipals(java.lang.String user,
java.lang.String password)
Get all groups and users from authentication scheme. |
java.lang.String[] |
getUsers(java.lang.String user,
java.lang.String password)
Get all users from the authentication service |
java.lang.String[] |
getUsers(java.lang.String user,
java.lang.String password,
java.lang.String group)
Get the users for a particular group from the authentication service |
static void |
main(java.lang.String[] args)
Test method for the class |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AuthLdap()
Method Detail |
public boolean authenticate(java.lang.String user, java.lang.String password) throws java.net.ConnectException
authenticate
in interface AuthInterface
user
- the name of the principal to authenticatepassword
- the password to use for authenticationpublic java.lang.String[] getUsers(java.lang.String user, java.lang.String password) throws java.net.ConnectException
getUsers
in interface AuthInterface
user
- the user for authenticating against the servicepassword
- the password for authenticating against the servicepublic java.lang.String[] getUsers(java.lang.String user, java.lang.String password, java.lang.String group) throws java.net.ConnectException
getUsers
in interface AuthInterface
user
- the user for authenticating against the servicepassword
- the password for authenticating against the servicegroup
- the group whose user list should be returnedpublic java.lang.String[] getGroups(java.lang.String user, java.lang.String password) throws java.net.ConnectException
getGroups
in interface AuthInterface
user
- the user for authenticating against the servicepassword
- the password for authenticating against the servicepublic java.lang.String[] getGroups(java.lang.String user, java.lang.String password, java.lang.String foruser) throws java.net.ConnectException
getGroups
in interface AuthInterface
user
- the user for authenticating against the servicepassword
- the password for authenticating against the serviceforuser
- the user whose group list should be returnedpublic java.util.HashMap getAttributes(java.lang.String foruser) throws java.net.ConnectException
getAttributes
in interface AuthInterface
foruser
- the user for which the attribute list is requestedpublic java.util.HashMap getAttributes(java.lang.String user, java.lang.String password, java.lang.String foruser) throws java.net.ConnectException
getAttributes
in interface AuthInterface
user
- the user for authenticating against the servicepassword
- the password for authenticating against the serviceforuser
- the user whose attributes should be returnedpublic java.lang.String getPrincipals(java.lang.String user, java.lang.String password) throws java.net.ConnectException
getPrincipals
in interface AuthInterface
user
- the user which requests the informationpassword
- the user's passwordpublic static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |