edu.ucsb.nceas.metacat
Interface AuthInterface

All Known Implementing Classes:
AuthLdap, AuthStub, AuthTest

public interface AuthInterface

An interface representing the methods that should be implemented by an authentication service. The authentication service is used to determine if a user is authenticated, and whether they are a member of a particular group.


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<java.lang.String,java.util.Vector<java.lang.String>> getAttributes(java.lang.String foruser)
          Get attributes describing a user or group
 java.util.HashMap<java.lang.String,java.util.Vector<java.lang.String>> 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 service.
 java.lang.String[] getUserInfo(java.lang.String user, java.lang.String password)
          Get information for a user - name, organization and email address.
 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
 

Method Detail

authenticate

boolean authenticate(java.lang.String user,
                     java.lang.String password)
                     throws java.net.ConnectException
Determine if a user/password are valid according to the authentication service.

Parameters:
user - the name of the principal to authenticate
password - the password to use for authentication
Throws:
java.net.ConnectException

getUsers

java.lang.String[][] getUsers(java.lang.String user,
                              java.lang.String password)
                              throws java.net.ConnectException
Get all users from the authentication service

Throws:
java.net.ConnectException

getUserInfo

java.lang.String[] getUserInfo(java.lang.String user,
                               java.lang.String password)
                               throws java.net.ConnectException
Get information for a user - name, organization and email address.

Throws:
java.net.ConnectException

getUsers

java.lang.String[] getUsers(java.lang.String user,
                            java.lang.String password,
                            java.lang.String group)
                            throws java.net.ConnectException
Get the users for a particular group from the authentication service

Throws:
java.net.ConnectException

getGroups

java.lang.String[][] getGroups(java.lang.String user,
                               java.lang.String password)
                               throws java.net.ConnectException
Get all groups from the authentication service

Throws:
java.net.ConnectException

getGroups

java.lang.String[][] getGroups(java.lang.String user,
                               java.lang.String password,
                               java.lang.String foruser)
                               throws java.net.ConnectException
Get the groups for a particular user from the authentication service

Throws:
java.net.ConnectException

getAttributes

java.util.HashMap<java.lang.String,java.util.Vector<java.lang.String>> getAttributes(java.lang.String foruser)
                                                                                     throws java.net.ConnectException
Get attributes describing a user or group

Parameters:
user - the user for which the attribute list is requested
Throws:
java.net.ConnectException

getAttributes

java.util.HashMap<java.lang.String,java.util.Vector<java.lang.String>> getAttributes(java.lang.String user,
                                                                                     java.lang.String password,
                                                                                     java.lang.String foruser)
                                                                                     throws java.net.ConnectException
Get attributes describing a user or group

Parameters:
user - the user for which the attribute list is requested
authuser - the user for authenticating against the service
password - the password for authenticating against the service
Throws:
java.net.ConnectException

getPrincipals

java.lang.String getPrincipals(java.lang.String user,
                               java.lang.String password)
                               throws java.net.ConnectException
Get all groups and users from authentication service. The output is formatted in XML.

Parameters:
user - the user which requests the information
password - the user's password
Throws:
java.net.ConnectException


Copyright © 2000 National Center for Ecological Analysis and Synthesis. All Rights Reserved.