riot-web/test/stores
Kerry 84ca519b3f
OIDC: revoke tokens on logout (#11718)
* 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

* utils to persist clientId and issuer after oidc authentication

* add dep oidc-client-ts

* persist issuer and clientId after successful oidc auth

* add OidcClientStore

* comments and tidy

* expose getters for stored refresh and access tokens in Lifecycle

* revoke tokens with oidc provider

* test logout action in MatrixChat

* comments

* prettier

* test OidcClientStore.revokeTokens

* put pickle key destruction back

* 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

* OidcClientStore.initClient use stored issuer when client well known unavailable

* test Lifecycle.logout

* update Lifecycle test replaceUsingCreds calls

* fix test

* 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

* fix test mock, comment

* typo

* add sdkContext to SoftLogout, pass oidcClientStore to logout

* fullstops

* comments

* fussy comment formatting

---------

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2023-10-15 21:35:25 +00:00
..
__snapshots__
notifications Switch to importing models/Room from main js-sdk export (#11361) 2023-08-04 07:36:16 +00:00
oidc OIDC: revoke tokens on logout (#11718) 2023-10-15 21:35:25 +00:00
right-panel Switch to importing client from main js-sdk export (#11370) 2023-08-09 07:18:41 +00:00
room-list Move `mediaDevices` mock out of `setupManualMocks` (#11413) 2023-08-16 08:29:34 +00:00
widgets Add an action to upload media files according to MSC4039 (#11311) 2023-09-21 19:03:22 +00:00
AccountPasswordStore-test.ts
ActiveWidgetStore-test.ts
AutoRageshakeStore-test.ts Switch to importing more things from the main js-sdk export (#11377) 2023-08-10 08:01:14 +00:00
BreadcrumbsStore-test.ts Remove new room breadcrumbs (#11104) 2023-06-19 08:18:46 +00:00
MemberListStore-test.ts
OwnBeaconStore-test.ts Consume more imports from matrix-js-sdk/src/matrix (#11449) 2023-08-23 09:04:25 +00:00
OwnProfileStore-test.ts Handle own profile 404 (#11319) 2023-07-26 09:54:45 +00:00
RoomNotificationStateStore-test.ts Switch to importing more things from the main js-sdk export (#11377) 2023-08-10 08:01:14 +00:00
RoomViewStore-test.ts Use knock rooms sync to reflect the knock state (#11596) 2023-09-11 16:33:40 +00:00
SetupEncryptionStore-test.ts Switch to importing models/{event-timeline{,set},user,device,event-status} from main js-sdk export (#11368) 2023-08-08 07:16:04 +00:00
SpaceStore-test.ts Switch to importing @types/{event,partials} from main js-sdk export (#11369) 2023-08-08 10:12:12 +00:00
ToastStore-test.ts
TypingStore-test.ts
UserProfilesStore-test.ts Check profiles before starting a DM (#10472) 2023-04-05 13:13:51 +02:00
VoiceRecordingStore-test.ts
WidgetLayoutStore-test.ts Support dynamic room predecessors in WidgetLayoutStore (#10326) 2023-03-09 10:18:23 +00:00