Skip to content
This repository was archived by the owner on Jun 1, 2023. It is now read-only.

Commit 502857d

Browse files
committed
If httpc_param is defined in the configuration apply it on the KeyJar instance.
1 parent 79e603d commit 502857d

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

src/oidcmsg/context.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,13 @@ def __init__(self, config=None, keyjar=None, entity_id=''):
3434
self.db_conf = add_issuer(self.db_conf, _iss)
3535
self.storage_cls = get_storage_class(self.db_conf)
3636

37-
self.db = init_storage(self.db_conf)
37+
if self.db_conf.get('default'):
38+
self.db = init_storage(self.db_conf)
39+
else:
40+
self.db = None
41+
else:
42+
self.db = init_storage()
43+
3844
self.keyjar = self._keyjar(keyjar, self.db_conf, config, entity_id=entity_id)
3945

4046
def add_boxes(self, boxes, db_conf):
@@ -64,18 +70,20 @@ def _keyjar(self, keyjar=None, db_conf=None, conf=None, entity_id=''):
6470
# make sure I have the keys under my own name too (if I know it)
6571
_keyjar.import_jwks_as_json(_keyjar.export_jwks_as_json(True, ''), entity_id)
6672

73+
_httpc_params = conf.get('httpc_param')
74+
if _httpc_params:
75+
_keyjar.httpc_params = _httpc_params
76+
6777
return _keyjar
6878
else:
6979
return keyjar
7080

71-
7281
def set(self, item, value):
7382
if isinstance(value, Message):
7483
self.db[item] = value.to_dict()
7584
else:
7685
self.db[item] = value
7786

78-
7987
def get(self, item):
8088
if item == 'seed':
8189
return bytes(self.db[item], 'utf-8')

0 commit comments

Comments
 (0)