sources/saml: fix build_full_url
using incorrect URL parameter
This commit is contained in:
parent
e0272a6422
commit
c8b3c6e51a
|
@ -11,6 +11,7 @@ class SAMLSource(Source):
|
|||
"""SAML Source"""
|
||||
|
||||
entity_id = models.TextField(blank=True, default=None, verbose_name=_("Entity ID"))
|
||||
|
||||
idp_url = models.URLField(verbose_name=_("IDP URL"))
|
||||
idp_logout_url = models.URLField(
|
||||
default=None, blank=True, null=True, verbose_name=_("IDP Logout URL")
|
||||
|
@ -33,7 +34,7 @@ class SAMLSource(Source):
|
|||
@property
|
||||
def ui_additional_info(self) -> str:
|
||||
metadata_url = reverse_lazy(
|
||||
"passbook_sources_saml:metadata", kwargs={"source_slug": self}
|
||||
"passbook_sources_saml:metadata", kwargs={"source_slug": self.slug}
|
||||
)
|
||||
return f'<a href="{metadata_url}" class="btn btn-default btn-sm">Metadata Download</a>'
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ def get_entity_id(request: HttpRequest, source: SAMLSource):
|
|||
def build_full_url(view: str, request: HttpRequest, source: SAMLSource) -> str:
|
||||
"""Build Full ACS URL to be used in IDP"""
|
||||
return request.build_absolute_uri(
|
||||
reverse(f"passbook_sources_saml:{view}", kwargs={"source": source.slug})
|
||||
reverse(f"passbook_sources_saml:{view}", kwargs={"source_slug": source.slug})
|
||||
)
|
||||
|
||||
|
||||
|
|
Reference in a new issue