def __init__(self, settings=None, custom_base_path=None, sp_validation_only=False):
    '\n        Initializes the settings:\n        - Sets the paths of the different folders\n        - Loads settings info from settings file or array/object provided\n\n        :param settings: SAML Toolkit Settings\n        :type settings: dict\n\n        :param custom_base_path: Path where are stored the settings file and the cert folder\n        :type custom_base_path: string\n\n        :param sp_validation_only: Avoid the IdP validation\n        :type sp_validation_only: boolean\n        '
    self.__sp_validation_only = sp_validation_only
    self.__paths = {}
    self.__strict = False
    self.__debug = False
    self.__sp = {}
    self.__idp = {}
    self.__security = {}
    self.__contacts = {}
    self.__organization = {}
    self.__errors = []
    self.__load_paths(base_path=custom_base_path)
    self.__update_paths(settings)
    if (settings is None):
        try:
            valid = self.__load_settings_from_file()
        except Exception as e:
            raise e
        if (not valid):
            raise OneLogin_Saml2_Error('Invalid dict settings at the file: %s', OneLogin_Saml2_Error.SETTINGS_INVALID, ','.join(self.__errors))
    elif isinstance(settings, dict):
        if (not self.__load_settings_from_dict(settings)):
            raise OneLogin_Saml2_Error('Invalid dict settings: %s', OneLogin_Saml2_Error.SETTINGS_INVALID, ','.join(self.__errors))
    else:
        raise OneLogin_Saml2_Error('Unsupported settings object', OneLogin_Saml2_Error.UNSUPPORTED_SETTINGS_OBJECT)
    self.format_idp_cert()
    if ('x509certMulti' in self.__idp):
        self.format_idp_cert_multi()
    self.format_sp_cert()
    if ('x509certNew' in self.__sp):
        self.format_sp_cert_new()
    self.format_sp_key()
Initializes the settings:
- Sets the paths of the different folders
- Loads settings info from settings file or array/object provided

:param settings: SAML Toolkit Settings
:type settings: dict

:param custom_base_path: Path where are stored the settings file and the cert folder
:type custom_base_path: string

:param sp_validation_only: Avoid the IdP validation
:type sp_validation_only: boolean
def __init__(self, settings=None, custom_base_path=None, sp_validation_only=False):
    '\n        Initializes the settings:\n        - Sets the paths of the different folders\n        - Loads settings info from settings file or array/object provided\n\n        :param settings: SAML Toolkit Settings\n        :type settings: dict\n\n        :param custom_base_path: Path where are stored the settings file and the cert folder\n        :type custom_base_path: string\n\n        :param sp_validation_only: Avoid the IdP validation\n        :type sp_validation_only: boolean\n        '
    self.__sp_validation_only = sp_validation_only
    self.__paths = {}
    self.__strict = False
    self.__debug = False
    self.__sp = {}
    self.__idp = {}
    self.__security = {}
    self.__contacts = {}
    self.__organization = {}
    self.__errors = []
    self.__load_paths(base_path=custom_base_path)
    self.__update_paths(settings)
    if (settings is None):
        try:
            valid = self.__load_settings_from_file()
        except Exception as e:
            raise e
        if (not valid):
            raise OneLogin_Saml2_Error('Invalid dict settings at the file: %s', OneLogin_Saml2_Error.SETTINGS_INVALID, ','.join(self.__errors))
    elif isinstance(settings, dict):
        if (not self.__load_settings_from_dict(settings)):
            raise OneLogin_Saml2_Error('Invalid dict settings: %s', OneLogin_Saml2_Error.SETTINGS_INVALID, ','.join(self.__errors))
    else:
        raise OneLogin_Saml2_Error('Unsupported settings object', OneLogin_Saml2_Error.UNSUPPORTED_SETTINGS_OBJECT)
    self.format_idp_cert()
    if ('x509certMulti' in self.__idp):
        self.format_idp_cert_multi()
    self.format_sp_cert()
    if ('x509certNew' in self.__sp):
        self.format_sp_cert_new()
    self.format_sp_key()