|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.metamatrix.platform.security.membership.spi.file.FileMembershipDomain
public class FileMembershipDomain
A membership domain that loads user and group definitions from the file system.
Field Summary | |
---|---|
static java.lang.String |
CHECK_PASSWORD
|
static java.lang.String |
GROUPS_FILE
|
static java.lang.String |
USERS_FILE
|
Constructor Summary | |
---|---|
FileMembershipDomain()
|
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. |
protected boolean |
checkPasswords()
|
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. |
protected java.util.HashMap |
getGroups()
|
protected java.util.HashMap |
getUserGroups()
|
protected java.util.Properties |
getUsers()
|
void |
initialize(java.util.Properties env)
Initialize this domain with the given properties. |
void |
shutdown()
Shut down this domain to further work. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String USERS_FILE
public static final java.lang.String GROUPS_FILE
public static final java.lang.String CHECK_PASSWORD
Constructor Detail |
---|
public FileMembershipDomain()
Method Detail |
---|
public void initialize(java.util.Properties env) throws MembershipSourceException
MembershipDomain
initialize
in interface MembershipDomain
env
- contains the properties for this domain as set by the console
MembershipSourceException
MembershipDomain.initialize(java.util.Properties)
public void shutdown()
MembershipDomain
shutdown
in interface MembershipDomain
MembershipDomain.shutdown()
public SuccessfulAuthenticationToken authenticateUser(java.lang.String username, Credentials credential, java.io.Serializable trustedPayload, java.lang.String applicationName) throws UnsupportedCredentialException, InvalidUserException, LogonException, MembershipSourceException
MembershipDomain
authenticateUser
in interface MembershipDomain
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.
UnsupportedCredentialException
- if the credential or trustedPayload cannot be used to authenticate the user
InvalidUserException
- if the user does not exist in this domain
LogonException
- if the user was unsuccessfully authenticated
MembershipSourceException
- if there was an internal errorMembershipDomain.authenticateUser(java.lang.String, com.metamatrix.platform.security.api.Credentials, java.io.Serializable, java.lang.String)
public java.util.Set getGroupNames() throws MembershipSourceException
MembershipDomain
getGroupNames
in interface MembershipDomain
MembershipSourceException
- if there was an internal errorMembershipDomain.getGroupNames()
public java.util.Set getGroupNamesForUser(java.lang.String username) throws InvalidUserException, MembershipSourceException
MembershipDomain
getGroupNamesForUser
in interface MembershipDomain
InvalidUserException
- if the user does not exist in this domain
MembershipSourceException
- if there was an internal errorMembershipDomain.getGroupNamesForUser(java.lang.String)
protected boolean checkPasswords()
protected java.util.HashMap getGroups()
protected java.util.HashMap getUserGroups()
protected java.util.Properties getUsers()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |