providers/saml: use redirect binding first

This commit is contained in:
Jens Langhammer 2021-02-16 21:35:19 +01:00
parent 099197ba8c
commit a647917074
1 changed files with 6 additions and 6 deletions

View File

@ -65,18 +65,18 @@ class MetadataProcessor:
def get_bindings(self) -> Iterator[Element]: def get_bindings(self) -> Iterator[Element]:
"""Get all Bindings supported""" """Get all Bindings supported"""
binding_url_map = { binding_url_map = {
SAML_BINDING_POST: self.http_request.build_absolute_uri(
reverse(
"authentik_providers_saml:sso-post",
kwargs={"application_slug": self.provider.application.slug},
)
),
SAML_BINDING_REDIRECT: self.http_request.build_absolute_uri( SAML_BINDING_REDIRECT: self.http_request.build_absolute_uri(
reverse( reverse(
"authentik_providers_saml:sso-redirect", "authentik_providers_saml:sso-redirect",
kwargs={"application_slug": self.provider.application.slug}, kwargs={"application_slug": self.provider.application.slug},
) )
), ),
SAML_BINDING_POST: self.http_request.build_absolute_uri(
reverse(
"authentik_providers_saml:sso-post",
kwargs={"application_slug": self.provider.application.slug},
)
),
} }
for binding, url in binding_url_map.items(): for binding, url in binding_url_map.items():
element = Element(f"{{{NS_SAML_METADATA}}}SingleSignOnService") element = Element(f"{{{NS_SAML_METADATA}}}SingleSignOnService")