File tree 2 files changed +8
-2
lines changed
2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -192,7 +192,13 @@ We will see a typical configuration for protecting a Django project::
192
192
saml2.BINDING_HTTP_POST),
193
193
],
194
194
},
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
+
196
202
# attributes that this project need to identify a user
197
203
'required_attributes': ['uid'],
198
204
Original file line number Diff line number Diff line change @@ -147,7 +147,7 @@ def login(request,
147
147
148
148
kwargs = {}
149
149
# 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 ):
151
151
kwargs ['force_authn' ] = "true"
152
152
if getattr (conf , '_sp_allow_create' , "false" ):
153
153
kwargs ['allow_create' ] = "true"
You can’t perform that action at this time.
0 commit comments