@@ -52,7 +52,11 @@ def __init__(self, auth_callback_func, internal_attributes, config, base_url, na
52
52
super ().__init__ (auth_callback_func , internal_attributes , base_url , name )
53
53
self .auth_callback_func = auth_callback_func
54
54
self .config = config
55
- self .client = _create_client (config ["provider_metadata" ], config ["client" ]["client_metadata" ])
55
+ self .client = _create_client (
56
+ config ["provider_metadata" ],
57
+ config ["client" ]["client_metadata" ],
58
+ config ["client" ].get ("verify_ssl" , True ),
59
+ )
56
60
if "scope" not in config ["client" ]["auth_req_params" ]:
57
61
config ["auth_req_params" ]["scope" ] = "openid"
58
62
if "response_type" not in config ["client" ]["auth_req_params" ]:
@@ -230,7 +234,7 @@ def get_metadata_desc(self):
230
234
return get_metadata_desc_for_oauth_backend (self .config ["provider_metadata" ]["issuer" ], self .config )
231
235
232
236
233
- def _create_client (provider_metadata , client_metadata ):
237
+ def _create_client (provider_metadata , client_metadata , verify_ssl = True ):
234
238
"""
235
239
Create a pyoidc client instance.
236
240
:param provider_metadata: provider configuration information
@@ -240,7 +244,9 @@ def _create_client(provider_metadata, client_metadata):
240
244
:return: client instance to use for communicating with the configured provider
241
245
:rtype: oic.oic.Client
242
246
"""
243
- client = oic .Client (client_authn_method = CLIENT_AUTHN_METHOD )
247
+ client = oic .Client (
248
+ client_authn_method = CLIENT_AUTHN_METHOD , verify_ssl = verify_ssl
249
+ )
244
250
245
251
# Provider configuration information
246
252
if "authorization_endpoint" in provider_metadata :
0 commit comments