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

Commit 6fabd6f

Browse files
committed
post_args handling
1 parent 4065a04 commit 6fabd6f

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/oidcservice/oauth2/access_token.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def update_service_context(self, resp, key='', **kwargs):
3434
resp['__expires_at'] = time_sans_frac() + int(resp['expires_in'])
3535
self.store_item(resp, 'token_response', key)
3636

37-
def oauth_pre_construct(self, request_args=None, **kwargs):
37+
def oauth_pre_construct(self, request_args=None, post_args=None, **kwargs):
3838
"""
3939
4040
:param request_args: Initial set of request arguments
@@ -59,4 +59,4 @@ def oauth_pre_construct(self, request_args=None, **kwargs):
5959
_args.update(request_args)
6060
request_args = _args
6161

62-
return request_args, {}
62+
return request_args, post_args

src/oidcservice/oidc/authorization.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def update_service_context(self, resp, key='', **kwargs):
6363
resp['__expires_at'] = time_sans_frac() + int(resp['expires_in'])
6464
self.store_item(resp.to_json(), 'auth_response', key)
6565

66-
def oidc_pre_construct(self, request_args=None, **kwargs):
66+
def oidc_pre_construct(self, request_args=None, post_args=None, **kwargs):
6767
if request_args is None:
6868
request_args = {}
6969

@@ -85,7 +85,9 @@ def oidc_pre_construct(self, request_args=None, **kwargs):
8585
if "nonce" not in request_args:
8686
request_args["nonce"] = rndstr(32)
8787

88-
post_args = {}
88+
if post_args is None:
89+
post_args = {}
90+
8991
for attr in ["request_object_signing_alg", "algorithm", 'sig_kid']:
9092
try:
9193
post_args[attr] = kwargs[attr]

0 commit comments

Comments
 (0)