コード例 #1
0
ファイル: metadata.py プロジェクト: 1stvamp/django-saml2-idp
def get_config_for_acs(acs_url):
    """
    Return SP configuration instance that handles acs_url.
    """
    for friendlyname, config in SAML2IDP_REMOTES.items():
        if config['acs_url'] == acs_url:
            return config
    msg = 'SAML2IDP_REMOTES is not configured to handle the AssertionConsumerService at "%s"'
    raise ImproperlyConfigured(msg % resource_name)
コード例 #2
0
ファイル: metadata.py プロジェクト: unomena/django-saml2-idp
def get_config_for_acs(acs_url):
    """
    Return SP configuration instance that handles acs_url.
    """
    for friendlyname, config in SAML2IDP_REMOTES.items():
        if config['acs_url'] == acs_url:
            return config
    msg = 'SAML2IDP_REMOTES is not configured to handle the AssertionConsumerService at "%s"'
    raise ImproperlyConfigured(msg % resource_name)
コード例 #3
0
ファイル: metadata.py プロジェクト: 1stvamp/django-saml2-idp
def get_config_for_resource(resource_name):
    """
    Return the SP configuration that handles a deep-link resource_name.
    """
    for friendlyname, config in SAML2IDP_REMOTES.items():
        links = get_links(config)
        for name, pattern in links:
            if name == resource_name:
                return config
    msg = 'SAML2IDP_REMOTES is not configured to handle a link resource "%s"'
    raise ImproperlyConfigured(msg % resource_name)
コード例 #4
0
ファイル: metadata.py プロジェクト: unomena/django-saml2-idp
def get_config_for_resource(resource_name):
    """
    Return the SP configuration that handles a deep-link resource_name.
    """
    for friendlyname, config in SAML2IDP_REMOTES.items():
        links = get_links(config)
        for name, pattern in links:
            if name == resource_name:
                return config
    msg = 'SAML2IDP_REMOTES is not configured to handle a link resource "%s"'
    raise ImproperlyConfigured(msg % resource_name)
コード例 #5
0
ファイル: metadata.py プロジェクト: 1stvamp/django-saml2-idp
def get_deeplink_resources():
    """
    Returns a list of resources that can be used for deep-linking.
    """
    resources = []
    for key, sp_config in SAML2IDP_REMOTES.items():
        links = get_links(sp_config)
        for resource, patterns in links:
            if '/' not in resource:
                # It's a simple deeplink, which is handled by 'login_init' URL.
                continue
            resources.append(resource)
    return resources
コード例 #6
0
ファイル: metadata.py プロジェクト: unomena/django-saml2-idp
def get_deeplink_resources():
    """
    Returns a list of resources that can be used for deep-linking.
    """
    resources = []
    for key, sp_config in SAML2IDP_REMOTES.items():
        links = get_links(sp_config)
        for resource, patterns in links:
            if '/' not in resource:
                # It's a simple deeplink, which is handled by 'login_init' URL.
                continue
            resources.append(resource)
    return resources