Skip to content

Commit ba41c2a

Browse files
committed
added force_auth to the doc
1 parent 5c59f6b commit ba41c2a

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

README.rst

+7-1
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,13 @@ We will see a typical configuration for protecting a Django project::
192192
saml2.BINDING_HTTP_POST),
193193
],
194194
},
195-
195+
# Mandates that the identity provider MUST authenticate the
196+
# presenter directly rather than rely on a previous security context.
197+
'force_authn': False,
198+
199+
# Enable AllowCreate in NameIDPolicy.
200+
'name_id_format_allow_create': False,
201+
196202
# attributes that this project need to identify a user
197203
'required_attributes': ['uid'],
198204

djangosaml2/views.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def login(request,
147147

148148
kwargs = {}
149149
# pysaml needs a string otherwise: "cannot serialize True (type bool)"
150-
if getattr(conf, '_sp_force_authn'):
150+
if getattr(conf, '_sp_force_authn',False):
151151
kwargs['force_authn'] = "true"
152152
if getattr(conf, '_sp_allow_create', "false"):
153153
kwargs['allow_create'] = "true"

0 commit comments

Comments
 (0)