Class PropertiesRolesMappingProvider
- java.lang.Object
-
- org.jboss.security.mapping.providers.role.AbstractRolesMappingProvider
-
- org.jboss.security.mapping.providers.role.PropertiesRolesMappingProvider
-
- All Implemented Interfaces:
MappingProvider<RoleGroup>
- Direct Known Subclasses:
SimpleRolesMappingProvider
public class PropertiesRolesMappingProvider extends AbstractRolesMappingProvider
AMappingProvider
that reads roles from a properties file in the formatusername=role1,role2,...
and adds those roles to the security context for authorization purposes.- Author:
- Marcus Moyses
-
-
Field Summary
Fields Modifier and Type Field Description protected Properties
roles
protected String
rolesRsrcName
-
Fields inherited from class org.jboss.security.mapping.providers.role.AbstractRolesMappingProvider
result
-
-
Constructor Summary
Constructors Constructor Description PropertiesRolesMappingProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
init(Map<String,Object> options)
Initialize the provider with the configured module optionsprotected Properties
loadRoles()
void
performMapping(Map<String,Object> contextMap, RoleGroup mappedObject)
Map the passed object-
Methods inherited from class org.jboss.security.mapping.providers.role.AbstractRolesMappingProvider
getCallerPrincipal, setMappingResult, supports
-
-
-
-
Field Detail
-
rolesRsrcName
protected String rolesRsrcName
-
roles
protected Properties roles
-
-
Method Detail
-
init
public void init(Map<String,Object> options)
Description copied from interface:MappingProvider
Initialize the provider with the configured module options
-
performMapping
public void performMapping(Map<String,Object> contextMap, RoleGroup mappedObject)
Description copied from interface:MappingProvider
Map the passed object- Parameters:
contextMap
- A read-only contextual map that can provide information to the providermappedObject
- an Object on which the mapping will be applied
-
loadRoles
protected Properties loadRoles() throws IOException
- Throws:
IOException
-
-