com.metamatrix.platform.security.membership.spi
Interface MembershipDomain

All Known Implementing Classes:
FileMembershipDomain, LDAPMembershipDomain

public interface MembershipDomain

Defines a Membership Domain for the Membership Service.


Method Summary
 SuccessfulAuthenticationToken authenticateUser(java.lang.String username, Credentials credential, java.io.Serializable trustedPayload, java.lang.String applicationName)
          Authenticate a user with the specified username and credential for use with the specified application.
 java.util.Set getGroupNames()
          Returns a String set all group names known to this domain.
 java.util.Set getGroupNamesForUser(java.lang.String username)
          Returns a String set of all group names the given user is a member of.
 void initialize(java.util.Properties env)
          Initialize this domain with the given properties.
 void shutdown()
          Shut down this domain to further work.
 

Method Detail

initialize

void initialize(java.util.Properties env)
                throws MembershipSourceException
Initialize this domain with the given properties.

Parameters:
env - contains the properties for this domain as set by the console
Throws:
ServiceStateException
MembershipSourceException

shutdown

void shutdown()
              throws MembershipSourceException
Shut down this domain to further work.

Throws:
ServiceStateException
MembershipSourceException

authenticateUser

SuccessfulAuthenticationToken authenticateUser(java.lang.String username,
                                               Credentials credential,
                                               java.io.Serializable trustedPayload,
                                               java.lang.String applicationName)
                                               throws UnsupportedCredentialException,
                                                      InvalidUserException,
                                                      LogonException,
                                                      MembershipSourceException
Authenticate a user with the specified username and credential for use with the specified application. The application name may also be used by the Membership Domain to determine the appropriate authentication mechanism.

Parameters:
username - The base username (without the domain suffix) of the individual attempting authentication. May be null if the membership domain implementation uses a mechanism other than username/credential authentication.
credential - The credentials belonging to the individual seeking authentication. May be null for anonymous authentications.
trustedPayload - The trusted payload set by the client. May be null if not set by the client.
applicationName - The name of the application to which the individual is attempting to authenticate. It's provided as a connection property when the individual connects (via URL or connection properties). This applicationName may be used by the authenticating membership domain as a basis for authentication and authorization.
Returns:
the SuccessfulAuthenticationToken containing the username and trustedPayload. The username in the SuccessfulAuthenticationToken will be used to identify this user in later calls. If the user is to be authenticated into a different domain, that domain name should be set on the SuccessfulAuthenticationToken. The return value should not be null.
Throws:
InvalidUserException - if the user does not exist in this domain
UnsupportedCredentialException - if the credential or trustedPayload cannot be used to authenticate the user
LogonException - if the user was unsuccessfully authenticated
MembershipSourceException - if there was an internal error

getGroupNames

java.util.Set getGroupNames()
                            throws MembershipSourceException
Returns a String set all group names known to this domain. The returned values should not be fully qualified with a domain suffix.

Returns:
a set of String group names
Throws:
MembershipSourceException - if there was an internal error

getGroupNamesForUser

java.util.Set getGroupNamesForUser(java.lang.String username)
                                   throws InvalidUserException,
                                          MembershipSourceException
Returns a String set of all group names the given user is a member of. The returned values should not be fully qualified with a domain suffix.

Parameters:
username -
Returns:
a set of String group names
Throws:
InvalidUserException - if the user does not exist in this domain
MembershipSourceException - if there was an internal error


Copyright © 2009. All Rights Reserved.