riot-web/test/utils
Kerry 3a025c4b21
OIDC: refresh tokens (#11699)
* test persistCredentials without a pickle key

* test setLoggedIn with pickle key

* lint

* type error

* extract token persisting code into function, persist refresh token

* store has_refresh_token too

* pass refreshToken from oidcAuthGrant into credentials

* rest restore session with pickle key

* retreive stored refresh token and add to credentials

* extract token decryption into function

* remove TODO

* very messy poc

* comments

* prettier

* comment pedantry

* working refresh without persistence

* extract token persistence functions to utils

* add sugar

* implement TokenRefresher class with persistence

* tidying

* persist idTokenClaims

* persist idTokenClaims

* tests

* remove unused cde

* create token refresher during doSetLoggedIn

* tidying

* also tidying

* update Lifecycle test replaceUsingCreds calls

* tidy

* test tokenrefresher creation in login flow

* test token refresher

* Update src/utils/oidc/TokenRefresher.ts

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>

* use literal value for m.authentication

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>

* improve comments

---------

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2023-10-12 00:49:07 +00:00
..
__snapshots__ Consolidate conjugation i18n strings (#11660) 2023-09-25 12:18:15 +01:00
beacon Consume more imports from matrix-js-sdk/src/matrix (#11449) 2023-08-23 09:04:25 +00:00
crypto
device
dm
exportUtils upgrade snapshots 2023-09-22 09:35:36 +01:00
localRoom
location Consume more imports from matrix-js-sdk/src/matrix (#11449) 2023-08-23 09:04:25 +00:00
media Move `mediaDevices` mock out of `setupManualMocks` (#11413) 2023-08-16 08:29:34 +00:00
oidc OIDC: refresh tokens (#11699) 2023-10-12 00:49:07 +00:00
permalinks Remove dead & duplicated code (#11405) 2023-08-15 08:43:15 +00:00
room
validate
AnimationUtils-test.ts
AutoDiscoveryUtils-test.tsx Migrate more strings to translation keys (#11694) 2023-10-03 19:17:26 +01:00
DMRoomMap-test.ts
DateUtils-test.ts Use Intl to localise dates and times (#11422) 2023-08-21 19:38:59 +00:00
ErrorUtils-test.ts Switch to importing more things from the main js-sdk export (#11376) 2023-08-09 15:10:54 +00:00
EventRenderingUtils-test.ts
EventUtils-test.ts Consume more imports from matrix-js-sdk/src/matrix (#11449) 2023-08-23 09:04:25 +00:00
Feedback-test.ts
FixedRollingArray-test.ts
FormattingUtils-test.tsx Consolidate conjugation i18n strings (#11660) 2023-09-25 12:18:15 +01:00
LruCache-test.ts
MegolmExportEncryption-test.ts
MessageDiffUtils-test.tsx
MultiInviter-test.ts
SearchInput-test.ts Remove dead & duplicated code (#11405) 2023-08-15 08:43:15 +00:00
SessionLock-test.ts Lock out the first tab if Element is opened in a second tab. (#11425) 2023-08-24 08:28:43 +00:00
ShieldUtils-test.ts ElementR: Cross user verification (#11364) 2023-09-18 17:34:00 +01:00
Singleflight-test.ts
SnakedObject-test.ts
UrlUtils-test.ts
WidgetUtils-test.ts
arrays-test.ts
colour-test.ts
connection-test.ts Switch to importing more things from the main js-sdk export (#11377) 2023-08-10 08:01:14 +00:00
createVoiceMessageContent-test.ts
direct-messages-test.ts
enums-test.ts
export-test.tsx
generate-megolm-test-vectors.py
i18n-helpers-test.ts Consolidate conjugation i18n strings (#11660) 2023-09-25 12:18:15 +01:00
iterables-test.ts
leave-behaviour-test.ts Switch to importing client from main js-sdk export (#11370) 2023-08-09 07:18:41 +00:00
local-room-test.ts
maps-test.ts
membership-test.ts Show knock rooms in the list (#11573) 2023-09-19 11:24:35 +00:00
notifications-test.ts Consume more imports from matrix-js-sdk/src/matrix (#11449) 2023-08-23 09:04:25 +00:00
numbers-test.ts
objects-test.ts
pillify-test.tsx
rooms-test.ts
sets-test.ts
stringOrderField-test.ts
threepids-test.ts Consume more imports from matrix-js-sdk/src/matrix (#11449) 2023-08-23 09:04:25 +00:00
tooltipify-test.tsx