providers/saml(minor): fix last wrong urls names
This commit is contained in:
parent
9110f7fee3
commit
ec73b53340
|
@ -50,7 +50,7 @@ class SAMLProvider(Provider):
|
||||||
"""Get link to download XML metadata for admin interface"""
|
"""Get link to download XML metadata for admin interface"""
|
||||||
try:
|
try:
|
||||||
# pylint: disable=no-member
|
# pylint: disable=no-member
|
||||||
return reverse('passbook_saml_idp:saml-metadata',
|
return reverse('passbook_providers_saml:saml-metadata',
|
||||||
kwargs={'application': self.application.slug})
|
kwargs={'application': self.application.slug})
|
||||||
except Provider.application.RelatedObjectDoesNotExist:
|
except Provider.application.RelatedObjectDoesNotExist:
|
||||||
return None
|
return None
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-footer">
|
<div class="card-footer">
|
||||||
<a href="{% url 'passbook_saml_idp:saml-metadata' %}" class="btn btn-primary"><clr-icon shape="download"></clr-icon>{% trans 'Download Metadata' %}</a>
|
<a href="{% url 'passbook_providers_saml:saml-metadata' %}" class="btn btn-primary"><clr-icon shape="download"></clr-icon>{% trans 'Download Metadata' %}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -92,7 +92,7 @@ class LoginBeginView(AccessRequiredView):
|
||||||
return HttpResponseBadRequest('the SAML request payload is missing')
|
return HttpResponseBadRequest('the SAML request payload is missing')
|
||||||
|
|
||||||
request.session['RelayState'] = source.get('RelayState', '')
|
request.session['RelayState'] = source.get('RelayState', '')
|
||||||
return redirect(reverse('passbook_saml_idp:saml-login-process', kwargs={
|
return redirect(reverse('passbook_providers_saml:saml-login-process', kwargs={
|
||||||
'application': application
|
'application': application
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
@ -204,10 +204,10 @@ class DescriptorDownloadView(AccessRequiredView):
|
||||||
def get(self, request, application):
|
def get(self, request, application):
|
||||||
"""Replies with the XML Metadata IDSSODescriptor."""
|
"""Replies with the XML Metadata IDSSODescriptor."""
|
||||||
entity_id = self.provider.issuer
|
entity_id = self.provider.issuer
|
||||||
slo_url = request.build_absolute_uri(reverse('passbook_saml_idp:saml-logout', kwargs={
|
slo_url = request.build_absolute_uri(reverse('passbook_providers_saml:saml-logout', kwargs={
|
||||||
'application': application
|
'application': application
|
||||||
}))
|
}))
|
||||||
sso_url = request.build_absolute_uri(reverse('passbook_saml_idp:saml-login', kwargs={
|
sso_url = request.build_absolute_uri(reverse('passbook_providers_saml:saml-login', kwargs={
|
||||||
'application': application
|
'application': application
|
||||||
}))
|
}))
|
||||||
pubkey = strip_pem_header(self.provider.signing_cert.replace('\r', '')).replace('\n', '')
|
pubkey = strip_pem_header(self.provider.signing_cert.replace('\r', '')).replace('\n', '')
|
||||||
|
|
|
@ -6,12 +6,12 @@
|
||||||
<h1>{{ source.name }}</h1>
|
<h1>{{ source.name }}</h1>
|
||||||
{% if connections.exists %}
|
{% if connections.exists %}
|
||||||
<p>{% trans 'Connected.' %}</p>
|
<p>{% trans 'Connected.' %}</p>
|
||||||
<a class="btn btn-danger" href="{% url 'passbook_oauth_client:oauth-client-disconnect' source_slug=source.slug %}">
|
<a class="btn btn-danger" href="{% url 'passbook_sources_oauth:oauth-client-disconnect' source_slug=source.slug %}">
|
||||||
{% trans 'Disconnect' %}
|
{% trans 'Disconnect' %}
|
||||||
</a>
|
</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<p>Not connected.</p>
|
<p>Not connected.</p>
|
||||||
<a class="btn btn-primary" href="{% url 'passbook_oauth_client:oauth-client-login' source_slug=source.slug %}">
|
<a class="btn btn-primary" href="{% url 'passbook_sources_oauth:oauth-client-login' source_slug=source.slug %}">
|
||||||
{% trans 'Connect' %}
|
{% trans 'Connect' %}
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -47,7 +47,7 @@ class OAuthRedirect(OAuthClientMixin, RedirectView):
|
||||||
|
|
||||||
def get_callback_url(self, source):
|
def get_callback_url(self, source):
|
||||||
"Return the callback url for this source."
|
"Return the callback url for this source."
|
||||||
return reverse('passbook_oauth_client:oauth-client-callback',
|
return reverse('passbook_sources_oauth:oauth-client-callback',
|
||||||
kwargs={'source_slug': source.slug})
|
kwargs={'source_slug': source.slug})
|
||||||
|
|
||||||
def get_redirect_url(self, **kwargs):
|
def get_redirect_url(self, **kwargs):
|
||||||
|
@ -195,7 +195,7 @@ class OAuthCallback(OAuthClientMixin, View):
|
||||||
messages.success(self.request, _("Successfully linked %(source)s!" % {
|
messages.success(self.request, _("Successfully linked %(source)s!" % {
|
||||||
'source': self.source.name
|
'source': self.source.name
|
||||||
}))
|
}))
|
||||||
return redirect(reverse('passbook_oauth_client:oauth-client-user', kwargs={
|
return redirect(reverse('passbook_sources_oauth:oauth-client-user', kwargs={
|
||||||
'source_slug': self.source.slug
|
'source_slug': self.source.slug
|
||||||
}))
|
}))
|
||||||
# User was not authenticated, new user has been created
|
# User was not authenticated, new user has been created
|
||||||
|
@ -225,7 +225,7 @@ class DisconnectView(LoginRequiredMixin, View):
|
||||||
# User confirmed deletion
|
# User confirmed deletion
|
||||||
self.aas.delete()
|
self.aas.delete()
|
||||||
messages.success(request, _('Connection successfully deleted'))
|
messages.success(request, _('Connection successfully deleted'))
|
||||||
return redirect(reverse('passbook_oauth_client:oauth-client-user', kwargs={
|
return redirect(reverse('passbook_sources_oauth:oauth-client-user', kwargs={
|
||||||
'source_slug': self.source.slug
|
'source_slug': self.source.slug
|
||||||
}))
|
}))
|
||||||
return self.get(request, source_slug)
|
return self.get(request, source_slug)
|
||||||
|
@ -234,7 +234,7 @@ class DisconnectView(LoginRequiredMixin, View):
|
||||||
"""Show delete form"""
|
"""Show delete form"""
|
||||||
return render(request, 'generic/delete.html', {
|
return render(request, 'generic/delete.html', {
|
||||||
'object': self.source,
|
'object': self.source,
|
||||||
'delete_url': reverse('passbook_oauth_client:oauth-client-disconnect', kwargs={
|
'delete_url': reverse('passbook_sources_oauth:oauth-client-disconnect', kwargs={
|
||||||
'source_slug': self.source.slug,
|
'source_slug': self.source.slug,
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
Reference in New Issue