Skip to content

Commit 997be32

Browse files
committed
HTTP-Redirect with optional signed authn requests
1 parent 8aa7455 commit 997be32

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

CHANGES

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
Changes
22
=======
33

4+
0.40.1 (2020-xx-yy)
5+
-------------------
6+
- [BugFix] HTTP-REDIRECT Authn Requests with optional signature now works.
7+
48
0.40.0 (2020-08-07)
59
-------------------
610
- Allow a SSO request without any attributes besides the NameID info. Backwards-incompatible changes to allow easier behaviour differentiation, two methods now receive the idp identifier (+ **kwargs were added to introduce possible similar changes in the future with less breaking effect):

djangosaml2/views.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@ def login(request,
115115
# is True (default value) we will redirect him to the came_from view.
116116
# Otherwise, we will show an (configurable) authorization error.
117117
if request.user.is_authenticated:
118-
redirect_authenticated_user = getattr(settings, 'SAML_IGNORE_AUTHENTICATED_USERS_ON_LOGIN', True)
118+
redirect_authenticated_user = getattr(settings,
119+
'SAML_IGNORE_AUTHENTICATED_USERS_ON_LOGIN', True)
119120
if redirect_authenticated_user:
120121
return HttpResponseRedirect(came_from)
121122
else:
@@ -197,7 +198,7 @@ def login(request,
197198
kwargs["sigalg"] = sig_alg_option_map[sig_alg_option]
198199
session_id, result = client.prepare_for_authenticate(
199200
entityid=selected_idp, relay_state=came_from,
200-
binding=binding, sign=False, nsprefix=nsprefix,
201+
binding=binding, sign=sign_requests, nsprefix=nsprefix,
201202
**kwargs)
202203
except TypeError as e:
203204
logger.error('Unable to know which IdP to use')

0 commit comments

Comments
 (0)