File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -1227,15 +1227,13 @@ def unsolicited_endpoint(self, context):
1227
1227
# If provided and known in the SAML metadata set the entityID for
1228
1228
# the IdP to use for authentication.
1229
1229
if target_idp_entity_id :
1230
- try :
1231
- target_idp_metadata = self . idp . metadata [ target_idp_entity_id ]
1232
- except KeyError :
1230
+ if target_idp_entity_id in self . idp . metadata :
1231
+ context . decorate ( Context . KEY_TARGET_ENTITYID , target_idp_entity_id )
1232
+ else :
1233
1233
msg = "Target IdP with entityID {} is unknown in metadata"
1234
1234
msg = msg .format (target_idp_entity_id )
1235
1235
satosa_logging (logger , logging .ERROR , msg , context .state )
1236
1236
raise SATOSAError (msg )
1237
1237
1238
- context .decorate (Context .KEY_TARGET_ENTITYID , target_idp_entity_id )
1239
-
1240
1238
# Handle the authn request use the base class.
1241
1239
return self ._handle_authn_request (context , BINDING_HTTP_POST , self .idp )
You can’t perform that action at this time.
0 commit comments