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.

19 lines
553 B
Python

5 years ago
import logging
5 years ago
from typing import Optional
from matrix_synapse_saml_mozilla import SamlMappingProvider
5 years ago
5 years ago
logging.basicConfig()
5 years ago
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)