Skip to content

fix(discovery_service): add missing imports and replace non existing variable came_from with next_path #258

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion djangosaml2/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@
HttpResponseRedirect, HttpResponseServerError)
from django.shortcuts import render
from django.template import TemplateDoesNotExist
from django.urls import reverse
from django.utils.decorators import method_decorator
from django.utils.http import urlquote
from django.views.decorators.csrf import csrf_exempt
from django.views.generic import View
from django.utils.module_loading import import_string
Expand Down Expand Up @@ -166,7 +168,7 @@ def get(self, request, *args, **kwargs):
"Discovery Service: {}").format(discovery_service))
login_url = request.build_absolute_uri(reverse('saml2_login'))
login_url = '{0}?next={1}'.format(login_url,
urlquote(came_from, safe=''))
urlquote(next_path, safe=''))
ds_url = '{0}?entityID={1}&return={2}&returnIDParam=idp'
ds_url = ds_url.format(discovery_service,
urlquote(
Expand Down