Révision cdadd39b
Ajouté par Serghei Mihai (congés, retour 15/05) il y a environ 9 ans
ckanext/ozwillo_pyoidc/oidc.py | ||
---|---|---|
17 | 17 |
|
18 | 18 |
|
19 | 19 |
class Client(oic.Client): |
20 |
def __init__(self, client_id=None, ca_certs=None, |
|
20 |
def __init__(self, client_id=None, client_secret=None, ca_certs=None,
|
|
21 | 21 |
client_prefs=None, client_authn_method=None, keyjar=None, |
22 | 22 |
verify_ssl=True, behaviour=None): |
23 |
oic.Client.__init__(self, client_id, ca_certs, client_prefs, |
|
24 |
client_authn_method, keyjar, verify_ssl) |
|
23 |
oic.Client.__init__(self, client_id, client_secret, ca_certs, |
|
24 |
client_prefs, client_authn_method, |
|
25 |
keyjar, verify_ssl) |
|
25 | 26 |
if behaviour: |
26 | 27 |
self.behaviour = behaviour |
27 | 28 |
|
... | ... | |
111 | 112 |
""" |
112 | 113 |
_key_set = set(kwargs.keys()) |
113 | 114 |
args = {} |
114 |
for param in ["verify_ssl"]: |
|
115 |
for param in ["verify_ssl", "client_id", "client_secret"]:
|
|
115 | 116 |
try: |
116 | 117 |
args[param] = kwargs[param] |
117 | 118 |
except KeyError: |
118 |
pass
|
|
119 |
args[param] = kwargs['client_registration'][param]
|
|
119 | 120 |
else: |
120 | 121 |
_key_set.discard(param) |
121 | 122 |
|
Formats disponibles : Unified diff
storing client's id and secret in Client obj