Class RoleMappingsProviderUtils

java.lang.Object
org.keycloak.adapters.saml.RoleMappingsProviderUtils

public class RoleMappingsProviderUtils extends Object
Utility class that allows for the instantiation and configuration of role mappings providers.
Author:
Stefan Guilhen
  • Constructor Details

    • RoleMappingsProviderUtils

      public RoleMappingsProviderUtils()
  • Method Details

    • bootstrapRoleMappingsProvider

      public static RoleMappingsProvider bootstrapRoleMappingsProvider(SamlDeployment deployment, ResourceLoader loader, SP.RoleMappingsProviderConfig providerConfig)
      Loads the available implementations of RoleMappingsProvider and selects the provider that matches the id that was configured in keycloak-saml.xml. The selected provider is then initialized with the specified SamlDeployment, ResourceLoader and configuration as specified in keycloak-saml.xml. If no provider was configured for the SP then null is returned.
      Parameters:
      deployment - a reference to the SamlDeployment that is being built.
      loader - a reference to the ResourceLoader that allows the provider implementation to load additional resources from the SP application WAR.
      providerConfig - the provider configuration properties as configured in keycloak-saml.xml. Can contain an empty properties object if no configuration properties were specified for the provider.
      Returns:
      the instantiated and initialized RoleMappingsProvider or null if no provider was configured for the SP.