File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -147,9 +147,9 @@ 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
- if getattr (conf , '_sp_allow_create' , "false" ):
152
+ if getattr (conf , '_sp_allow_create' , False ):
153
153
kwargs ['allow_create' ] = "true"
154
154
155
155
# is a embedded wayf needed?
@@ -165,7 +165,8 @@ def login(request,
165
165
if not idps :
166
166
raise IdPConfigurationMissing (('IdP configuration is missing or '
167
167
'its metadata is expired.' ))
168
- selected_idp = list (idps .keys ())[0 ]
168
+ if selected_idp is None :
169
+ selected_idp = list (idps .keys ())[0 ]
169
170
170
171
# choose a binding to try first
171
172
sign_requests = getattr (conf , '_sp_authn_requests_signed' , False )
You can’t perform that action at this time.
0 commit comments