Package org.wildfly.security.authz
Class RegexRoleMapper
- java.lang.Object
-
- org.wildfly.security.authz.RegexRoleMapper
-
- All Implemented Interfaces:
RoleMapper
public class RegexRoleMapper extends Object implements RoleMapper
A pattern role mapper.Role mapper that maps roles that contain Pattern with replacement. Pattern can capture groups that replacement string can use. Can be used to replace all occurrences of the pattern in role or only the first occurrence.
- Author:
- Diana Vilkolakova
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RegexRoleMapper.Builder
Construct a newRegexRoleMapper.Builder
for creating theRegexRoleMapper
.
-
Field Summary
Fields Modifier and Type Field Description private boolean
keepNonMapped
private Pattern
pattern
private boolean
replaceAll
private String
replacement
-
Fields inherited from interface org.wildfly.security.authz.RoleMapper
IDENTITY_ROLE_MAPPER
-
-
Constructor Summary
Constructors Modifier Constructor Description private
RegexRoleMapper(RegexRoleMapper.Builder builder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Roles
mapRoles(Roles rolesToMap)
Returns a set of strings representing the roles mapped from the given roles in their raw form.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.wildfly.security.authz.RoleMapper
and, minus, or, xor
-
-
-
-
Constructor Detail
-
RegexRoleMapper
private RegexRoleMapper(RegexRoleMapper.Builder builder)
-
-
Method Detail
-
mapRoles
public Roles mapRoles(Roles rolesToMap)
Description copied from interface:RoleMapper
Returns a set of strings representing the roles mapped from the given roles in their raw form.- Specified by:
mapRoles
in interfaceRoleMapper
- Parameters:
rolesToMap
- the roles in their raw form to apply mapping- Returns:
- the mapped role set
-
-