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

Commit c0235e2

Browse files
committed
Store map from sub to state.
1 parent 5437a4b commit c0235e2

3 files changed

Lines changed: 5 additions & 0 deletions

File tree

doc/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
Katt.smuts-1
12
.. oidccli documentation master file, created by
23
sphinx-quickstart on Sat Dec 30 17:32:48 2017.
34
You can adapt this file completely to your liking, but it should at least

src/oidcservice/oidc/access_token.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ def update_service_context(self, resp, state='', **kwargs):
6363
except KeyError:
6464
raise ValueError('Invalid nonce value')
6565

66+
self.store_sub2state(_idt['sub'], state)
67+
6668
if 'expires_in' in resp:
6769
resp['__expires_at'] = time_sans_frac() + int(
6870
resp['expires_in'])

src/oidcservice/oidc/authorization.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ def update_service_context(self, resp, state='', **kwargs):
5959
except KeyError:
6060
raise ValueError('Missing nonce value')
6161

62+
self.store_sub2state(_idt['sub'], state)
63+
6264
if 'expires_in' in resp:
6365
resp['__expires_at'] = time_sans_frac() + int(resp['expires_in'])
6466
self.store_item(resp.to_json(), 'auth_response', state)

0 commit comments

Comments
 (0)