Move field init to initializer, does not depend on constructor parameters
This commit is contained in:
parent
db3de0d933
commit
676cddc0d9
1 changed files with 6 additions and 5 deletions
|
@ -27,15 +27,16 @@ public class ScimEventListenerProvider implements EventListenerProvider {
|
|||
|
||||
private final KeycloakSession session;
|
||||
|
||||
private final Map<ResourceType, Pattern> patterns = new HashMap<>();
|
||||
private final Map<ResourceType, Pattern> patterns = Map.of(
|
||||
ResourceType.USER, Pattern.compile("users/(.+)"),
|
||||
ResourceType.GROUP, Pattern.compile("groups/([\\w-]+)(/children)?"),
|
||||
ResourceType.GROUP_MEMBERSHIP, Pattern.compile("users/(.+)/groups/(.+)"),
|
||||
ResourceType.REALM_ROLE_MAPPING, Pattern.compile("^(.+)/(.+)/role-mappings")
|
||||
);
|
||||
|
||||
public ScimEventListenerProvider(KeycloakSession session) {
|
||||
this.session = session;
|
||||
dispatcher = new ScimDispatcher(session);
|
||||
patterns.put(ResourceType.USER, Pattern.compile("users/(.+)"));
|
||||
patterns.put(ResourceType.GROUP, Pattern.compile("groups/([\\w-]+)(/children)?"));
|
||||
patterns.put(ResourceType.GROUP_MEMBERSHIP, Pattern.compile("users/(.+)/groups/(.+)"));
|
||||
patterns.put(ResourceType.REALM_ROLE_MAPPING, Pattern.compile("^(.+)/(.+)/role-mappings"));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue