Package org.jboss.security.auth.spi
Class MemoryUsersRolesLoginModule
- java.lang.Object
-
- org.jboss.security.auth.spi.AbstractServerLoginModule
-
- org.jboss.security.auth.spi.UsernamePasswordLoginModule
-
- org.jboss.security.auth.spi.UsersRolesLoginModule
-
- org.jboss.security.auth.spi.MemoryUsersRolesLoginModule
-
- All Implemented Interfaces:
LoginModule
public class MemoryUsersRolesLoginModule extends UsersRolesLoginModule
A subclass of UsersRolesLoginModule that uses a singleton instance and memory based users/roles Properties maps to manage user/password and user/role mappings. These maps need to be specified via the login module options.- Version:
- $Revision$
- Author:
- Scott.Stark@jboss.org
-
-
Field Summary
-
Fields inherited from class org.jboss.security.auth.spi.AbstractServerLoginModule
callbackHandler, jbossModuleName, log, loginOk, options, principalClassModuleName, principalClassName, sharedState, subject, unauthenticatedIdentity, useFirstPass
-
-
Constructor Summary
Constructors Constructor Description MemoryUsersRolesLoginModule()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Properties
createRoles(Map<String,?> options)
Provide the users map obtained during initializeprotected Properties
createUsers(Map<String,?> options)
Provide the users map obtained during initializevoid
initialize(Subject subject, CallbackHandler callbackHandler, Map<String,?> sharedState, Map<String,?> options)
Override the UsersRolesLoginModule initialize to look for a users and roles options specifying the-
Methods inherited from class org.jboss.security.auth.spi.UsersRolesLoginModule
getRoleSets, getUsersPassword, loadRoles, loadUsers, login, parseGroupMembers
-
Methods inherited from class org.jboss.security.auth.spi.UsernamePasswordLoginModule
createPasswordHash, getCredentials, getIdentity, getUnauthenticatedIdentity, getUsername, getUsernameAndPassword, getValidateError, safeClose, setValidateError, validatePassword
-
Methods inherited from class org.jboss.security.auth.spi.AbstractServerLoginModule
abort, addValidOptions, checkOptions, commit, createGroup, createIdentity, getCallerPrincipalGroup, getUseFirstPass, logout
-
-
-
-
Method Detail
-
initialize
public void initialize(Subject subject, CallbackHandler callbackHandler, Map<String,?> sharedState, Map<String,?> options)
Override the UsersRolesLoginModule initialize to look for a users and roles options specifying the- Specified by:
initialize
in interfaceLoginModule
- Overrides:
initialize
in classUsersRolesLoginModule
- Parameters:
subject
-callbackHandler
-sharedState
-options
-
-
createUsers
protected Properties createUsers(Map<String,?> options)
Provide the users map obtained during initialize- Overrides:
createUsers
in classUsersRolesLoginModule
- Parameters:
options
- - the login module options passed to initialize- Returns:
- the users login module option value
-
createRoles
protected Properties createRoles(Map<String,?> options) throws IOException
Provide the users map obtained during initialize- Overrides:
createRoles
in classUsersRolesLoginModule
- Parameters:
options
- - the login module options passed to initialize- Returns:
- the users login module option value
- Throws:
IOException
- - thrown on failure to load the properties
-
-