edu.ucsb.nceas.metacat
Interface AuthInterface

All Known Implementing Classes:
AuthLdap

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 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 service.
 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

public 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

public 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

getUsers

public 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

public 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

public 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

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

Throws:
java.net.ConnectException

getAttributes

public java.util.HashMap 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
password - the password for authenticating against the service
Throws:
java.net.ConnectException

getPrincipals

public 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.