riot-web/test
Kerry d9d52fba8c
OIDC: use delegated auth account URL from `OidcClientStore` (#11723)
* 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

* add sdkContext to UserSettingsDialog

* use sdkContext and oidcClientStore in session manager

* use sdkContext and OidcClientStore in generalusersettingstab

* 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 23:03:25 +00:00
..
@types
__snapshots__
accessibility
actions/handlers
audio Move `mediaDevices` mock out of `setupManualMocks` (#11413) 2023-08-16 08:29:34 +00:00
autocomplete
components OIDC: use delegated auth account URL from `OidcClientStore` (#11723) 2023-10-15 23:03:25 +00:00
contexts
dispatcher
editor Treat lists with a single empty item as plain text, not Markdown. (#6833) 2023-08-17 16:37:19 +00:00
events
hooks Fix useRoomMembers missing updates causing incorrect membership counts (#11392) 2023-08-09 12:27:37 +00:00
i18n Use Intl for names of languages (#11427) 2023-08-22 14:07:16 +00:00
images
img
models Switch to importing more things from the main js-sdk export (#11377) 2023-08-10 08:01:14 +00:00
modules Implement updated open dialog method of the Module API (#11395) 2023-08-21 12:09:17 +00:00
notifications
settings Fix instances of double translation and guard translation calls using typescript (#11443) 2023-08-22 16:32:05 +01:00
setup Locallazy: Convert even more strings (#11679) 2023-10-02 11:43:00 +01:00
stores OIDC: revoke tokens on logout (#11718) 2023-10-15 21:35:25 +00:00
test-utils OIDC: register (#11727) 2023-10-11 21:44:46 +00:00
toasts Switch to importing client from main js-sdk export (#11370) 2023-08-09 07:18:41 +00:00
utils OIDC: use delegated auth account URL from `OidcClientStore` (#11723) 2023-10-15 23:03:25 +00:00
voice-broadcast Switch to importing more things from the main js-sdk export (#11377) 2023-08-10 08:01:14 +00:00
widgets
Avatar-test.ts
ContentMessages-test.ts Default intentional mentions (#11602) 2023-09-14 11:36:15 +00:00
DecryptionFailureTracker-test.js
DeviceListener-test.ts DeviceListener: Remove usage of deprecated keybackup API (#11614) 2023-09-20 11:34:18 +00:00
HtmlUtils-test.tsx Switch to importing models/event from main js-sdk export (#11363) 2023-08-07 08:24:58 +00:00
Image-test.ts
KeyBindingsManager-test.ts
LegacyCallHandler-test.ts
Lifecycle-test.ts OIDC: revoke tokens on logout (#11718) 2023-10-15 21:35:25 +00:00
Markdown-test.ts
MatrixClientPeg-test.ts
MediaDeviceHandler-test.ts
Notifier-test.ts Switch to importing more things from the main js-sdk export (#11377) 2023-08-10 08:01:14 +00:00
PosthogAnalytics-test.ts
PreferredRoomVersions-test.ts
Reply-test.ts Consume more imports from matrix-js-sdk/src/matrix (#11449) 2023-08-23 09:04:25 +00:00
RoomNotifs-test.ts Show knock rooms in the list (#11573) 2023-09-19 11:24:35 +00:00
Rooms-test.ts
ScalarAuthClient-test.ts
SdkConfig-test.ts
SlashCommands-test.tsx Disable upgraderoom command without developer mode enabled (#11744) 2023-10-13 09:48:32 +00:00
SlidingSyncManager-test.ts
Terms-test.tsx
TestSdkContext.ts
TextForEvent-test.ts Fix instances of double translation and guard translation calls using typescript (#11443) 2023-08-22 16:32:05 +01:00
Unread-test.ts Consume more imports from matrix-js-sdk/src/matrix (#11449) 2023-08-23 09:04:25 +00:00
UserActivity-test.ts
WorkerManager-test.ts
createRoom-test.ts Switch to importing @types/{event,partials} from main js-sdk export (#11369) 2023-08-08 10:12:12 +00:00
email-test.ts
globalSetup.ts Improve randomString mock for better snapshots (#11375) 2023-08-09 09:39:48 +01:00
languageHandler-test.tsx Migrate more strings to translation keys (#11694) 2023-10-03 19:17:26 +01:00
linkify-matrix-test.ts
predictableRandom.ts
setupTests.ts Improve randomString mock for better snapshots (#11375) 2023-08-09 09:39:48 +01:00
slowReporter.js
theme-test.ts
useTopic-test.tsx