You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
522 B
Python
16 lines
522 B
Python
from typing import Optional, Tuple
|
|
|
|
from matrix_synapse_saml_mozilla import SamlMappingProvider
|
|
|
|
|
|
def create_mapping_provider(config_dict: Optional[dict] = None) -> SamlMappingProvider:
|
|
# Default configuration
|
|
if config_dict is None:
|
|
config_dict = {}
|
|
|
|
# Convert the config dictionary to a SamlMappingProvider.SamlConfig object
|
|
config = SamlMappingProvider.parse_config(config_dict)
|
|
|
|
# Create a new instance of the provider with the specified config
|
|
return SamlMappingProvider(config, None)
|