public class PropertiesRolesMappingProvider extends AbstractRolesMappingProvider
MappingProvider
that reads roles from a properties file in the format
username=role1,role2,...
and adds those roles to the security context for authorization purposes.Modifier and Type | Field and Description |
---|---|
protected Properties |
roles |
protected String |
rolesRsrcName |
result
Constructor and Description |
---|
PropertiesRolesMappingProvider() |
Modifier and Type | Method and Description |
---|---|
void |
init(Map<String,Object> options)
Initialize the provider with the configured module options
|
protected Properties |
loadRoles() |
void |
performMapping(Map<String,Object> contextMap,
RoleGroup mappedObject)
Map the passed object
|
getCallerPrincipal, setMappingResult, supports
protected String rolesRsrcName
protected Properties roles
public void init(Map<String,Object> options)
MappingProvider
public void performMapping(Map<String,Object> contextMap, RoleGroup mappedObject)
MappingProvider
contextMap
- A read-only contextual map that can provide information to the providermappedObject
- an Object on which the mapping will be appliedprotected Properties loadRoles() throws IOException
IOException
Copyright © 2021 JBoss by Red Hat. All rights reserved.