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,
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"
152- if getattr (conf , '_sp_allow_create' , "false" ):
152+ if getattr (conf , '_sp_allow_create' , False ):
153153 kwargs ['allow_create' ] = "true"
154154
155155 # is a embedded wayf needed?
@@ -165,7 +165,8 @@ def login(request,
165165 if not idps :
166166 raise IdPConfigurationMissing (('IdP configuration is missing or '
167167 'its metadata is expired.' ))
168- selected_idp = list (idps .keys ())[0 ]
168+ if selected_idp is None :
169+ selected_idp = list (idps .keys ())[0 ]
169170
170171 # choose a binding to try first
171172 sign_requests = getattr (conf , '_sp_authn_requests_signed' , False )
You can’t perform that action at this time.
0 commit comments