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"""
|
||||
try:
|
||||
# pylint: disable=no-member
|
||||
return reverse('passbook_saml_idp:saml-metadata',
|
||||
return reverse('passbook_providers_saml:saml-metadata',
|
||||
kwargs={'application': self.application.slug})
|
||||
except Provider.application.RelatedObjectDoesNotExist:
|
||||
return None
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
</section>
|
||||
</div>
|
||||
<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>
|
||||
|
|
|
@ -92,7 +92,7 @@ class LoginBeginView(AccessRequiredView):
|
|||
return HttpResponseBadRequest('the SAML request payload is missing')
|
||||
|
||||
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
|
||||
}))
|
||||
|
||||
|
@ -204,10 +204,10 @@ class DescriptorDownloadView(AccessRequiredView):
|
|||
def get(self, request, application):
|
||||
"""Replies with the XML Metadata IDSSODescriptor."""
|
||||
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
|
||||
}))
|
||||
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
|
||||
}))
|
||||
pubkey = strip_pem_header(self.provider.signing_cert.replace('\r', '')).replace('\n', '')
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
<h1>{{ source.name }}</h1>
|
||||
{% if connections.exists %}
|
||||
<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' %}
|
||||
</a>
|
||||
{% else %}
|
||||
<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' %}
|
||||
</a>
|
||||
{% endif %}
|
||||
|
|
|
@ -47,7 +47,7 @@ class OAuthRedirect(OAuthClientMixin, RedirectView):
|
|||
|
||||
def get_callback_url(self, 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})
|
||||
|
||||
def get_redirect_url(self, **kwargs):
|
||||
|
@ -195,7 +195,7 @@ class OAuthCallback(OAuthClientMixin, View):
|
|||
messages.success(self.request, _("Successfully linked %(source)s!" % {
|
||||
'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
|
||||
}))
|
||||
# User was not authenticated, new user has been created
|
||||
|
@ -225,7 +225,7 @@ class DisconnectView(LoginRequiredMixin, View):
|
|||
# User confirmed deletion
|
||||
self.aas.delete()
|
||||
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
|
||||
}))
|
||||
return self.get(request, source_slug)
|
||||
|
@ -234,7 +234,7 @@ class DisconnectView(LoginRequiredMixin, View):
|
|||
"""Show delete form"""
|
||||
return render(request, 'generic/delete.html', {
|
||||
'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,
|
||||
})
|
||||
})
|
||||
|
|
Reference in New Issue