Package org.jboss.security.auth.spi
Class PropertiesUsersLoginModule
- 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.PropertiesUsersLoginModule
-
- All Implemented Interfaces:
LoginModule
- Direct Known Subclasses:
SimpleUsersLoginModule
public class PropertiesUsersLoginModule extends UsersRolesLoginModule
ALoginModule
that uses a properties file to store username and password for authentication. No roles are mapped.- Author:
- Marcus Moyses
-
-
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 PropertiesUsersLoginModule()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Properties
createRoles(Map<String,?> options)
A hook to allow subclasses to create the roles Properties map.protected Group[]
getRoleSets()
Create the set of roles the user belongs to by parsing the roles.properties data for username=role1,role2,...-
Methods inherited from class org.jboss.security.auth.spi.UsersRolesLoginModule
createUsers, getUsersPassword, initialize, 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
-
getRoleSets
protected Group[] getRoleSets() throws LoginException
Description copied from class:UsersRolesLoginModule
Create the set of roles the user belongs to by parsing the roles.properties data for username=role1,role2,... and username.XXX=role1,role2,... patterns.- Overrides:
getRoleSets
in classUsersRolesLoginModule
- Returns:
- Group[] containing the sets of roles
- Throws:
LoginException
-
createRoles
protected Properties createRoles(Map<String,?> options) throws IOException
Description copied from class:UsersRolesLoginModule
A hook to allow subclasses to create the roles Properties map. This implementation simply calls loadRoles() and returns the roles ivar. Subclasses can override to obtain the roles Properties map in a different way.- Overrides:
createRoles
in classUsersRolesLoginModule
- Parameters:
options
- - the login module options passed to initialize- Returns:
- Properties map used for the username/roles mapping.
- Throws:
IOException
- - thrown on failure to load the properties
-
-