Package org.keycloak.adapters.saml
Class RoleMappingsProviderUtils
java.lang.Object
org.keycloak.adapters.saml.RoleMappingsProviderUtils
Utility class that allows for the instantiation and configuration of role mappings providers.
- Author:
- Stefan Guilhen
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic RoleMappingsProvider
bootstrapRoleMappingsProvider
(SamlDeployment deployment, ResourceLoader loader, SP.RoleMappingsProviderConfig providerConfig) Loads the available implementations ofRoleMappingsProvider
and selects the provider that matches the id that was configured inkeycloak-saml.xml
.
-
Constructor Details
-
RoleMappingsProviderUtils
public RoleMappingsProviderUtils()
-
-
Method Details
-
bootstrapRoleMappingsProvider
public static RoleMappingsProvider bootstrapRoleMappingsProvider(SamlDeployment deployment, ResourceLoader loader, SP.RoleMappingsProviderConfig providerConfig) Loads the available implementations ofRoleMappingsProvider
and selects the provider that matches the id that was configured inkeycloak-saml.xml
. The selected provider is then initialized with the specifiedSamlDeployment
,ResourceLoader
and configuration as specified inkeycloak-saml.xml
. If no provider was configured for the SP thennull
is returned.- Parameters:
deployment
- a reference to theSamlDeployment
that is being built.loader
- a reference to theResourceLoader
that allows the provider implementation to load additional resources from the SP application WAR.providerConfig
- the provider configuration properties as configured inkeycloak-saml.xml
. Can contain an empty properties object if no configuration properties were specified for the provider.- Returns:
- the instantiated and initialized
RoleMappingsProvider
ornull
if no provider was configured for the SP.
-