|
19 | 19 | from oidcendpoint.user_authn.authn_context import populate_authn_broker |
20 | 20 | from oidcendpoint.user_info import SCOPE2CLAIMS |
21 | 21 | from oidcendpoint.util import build_endpoints |
| 22 | +from oidcendpoint.util import get_http_params |
22 | 23 | from oidcendpoint.util import importer |
23 | 24 |
|
24 | 25 | logger = logging.getLogger(__name__) |
@@ -232,15 +233,11 @@ def __init__( |
232 | 233 | self.registration_access_token = {} |
233 | 234 |
|
234 | 235 | # The HTTP clients request arguments |
235 | | - _verify = conf.get('verify_ssl', True) |
236 | | - self.httpc_params= {'verify': _verify} |
237 | | - |
238 | | - _cli_cert = conf.get("client_cert") |
239 | | - _cli_key = conf.get("client_key") |
240 | | - if _cli_cert and _cli_key: |
241 | | - self.httpc_params["cert"] = (_cli_cert, _cli_key) |
242 | | - elif _cli_cert: # The file contains both the certificate and the key |
243 | | - self.httpc_params["cert"] = _cli_cert |
| 236 | + _cnf = conf.get("http_params") |
| 237 | + if _cnf: |
| 238 | + self.httpc_params= get_http_params(_cnf) |
| 239 | + else: # Backward compatibility |
| 240 | + self.httpc_params = {"verify": conf.get("verify_ssl")} |
244 | 241 |
|
245 | 242 | def set_session_db(self, sso_db=None, db=None): |
246 | 243 | sso_db = sso_db or SSODb() |
|
0 commit comments