element-web/src/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
..
beacon Consume more imports from matrix-js-sdk/src/matrix (#11449) 2023-08-23 09:04:25 +00:00
crypto Switch to importing client from main js-sdk export (#11370) 2023-08-09 07:18:41 +00:00
device Switch to importing client from main js-sdk export (#11370) 2023-08-09 07:18:41 +00:00
dm Improve types (#11239) 2023-07-12 15:56:51 +01:00
event Migrate more strings to translation keys (#11499) 2023-09-01 08:26:48 +01:00
exportUtils Migrate more strings to translation keys (#11522) 2023-09-04 19:41:39 +01:00
localRoom Conform more of the codebase to strictNullChecks (#10731) 2023-04-28 09:45:36 +01:00
location Migrate more strings to translation keys (#11613) 2023-09-19 17:16:38 +01:00
media Migrate more strings to translation keys (#11651) 2023-09-22 16:39:40 +01: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
pushRules Fix: sync intentional mentions push rules with legacy rules (#11667) 2023-09-27 00:03:38 +00:00
room Rebuild hook around room header call management 2023-09-06 17:41:52 +01:00
tokens OIDC: extract token persistence functions to utils (#11690) 2023-10-02 22:09:13 +00:00
validate Enable @typescript-eslint/explicit-function-return-type in /src (#9788) 2023-01-12 13:25:14 +00:00
AnimationUtils.ts Enable @typescript-eslint/explicit-function-return-type in /src (#9788) 2023-01-12 13:25:14 +00:00
arrays.ts shieldStatusForRoom: avoid deprecated MatrixClient methods (#10944) 2023-05-19 11:57:45 +01:00
AutoDiscoveryUtils.tsx Migrate more strings to translation keys (#11694) 2023-10-03 19:17:26 +01:00
blobs.ts Apply prettier formatting 2022-12-12 12:24:14 +01:00
BrowserWorkarounds.ts Apply prettier formatting 2022-12-12 12:24:14 +01:00
colour.ts Apply prettier formatting 2022-12-12 12:24:14 +01:00
connection.ts Switch to importing more things from the main js-sdk export (#11377) 2023-08-10 08:01:14 +00:00
createMatrixClient.ts Switch to importing more things from the main js-sdk export (#11394) 2023-08-14 08:58:55 +00:00
createVoiceMessageContent.ts Error handling if broadcast events could not be sent (#9885) 2023-01-17 07:57:59 +00:00
DecryptFile.ts Switch to importing more things from the main js-sdk export (#11376) 2023-08-09 15:10:54 +00:00
DialogOpener.ts Eliminate the use of MatrixClientPeg in utils (#10910) 2023-05-23 16:24:12 +01:00
direct-messages.ts Switch to importing client from main js-sdk export (#11370) 2023-08-09 07:18:41 +00:00
DirectoryUtils.ts Switch to importing client from main js-sdk export (#11370) 2023-08-09 07:18:41 +00:00
DMRoomMap.ts Switch to importing client from main js-sdk export (#11370) 2023-08-09 07:18:41 +00:00
EditorStateTransfer.ts Switch to importing models/event from main js-sdk export (#11363) 2023-08-07 08:24:58 +00:00
enums.ts Add enum utility tests 2021-04-22 20:37:19 -06:00
ErrorUtils.tsx Migrate more strings to translation keys (#11651) 2023-09-22 16:39:40 +01:00
EventRenderingUtils.ts Consume more imports from matrix-js-sdk/src/matrix (#11449) 2023-08-23 09:04:25 +00:00
EventUtils.ts Consume more imports from matrix-js-sdk/src/matrix (#11449) 2023-08-23 09:04:25 +00:00
Feedback.ts Conform more of the code base to strict null checking (#10147) 2023-02-13 17:01:43 +00:00
FileDownloader.ts Conform src/components/views/messages/* code to strictNullChecks (#10461) 2023-03-29 08:22:35 +01:00
FileUtils.ts Update all non-major dependencies (#11383) 2023-09-07 17:40:51 +00:00
FixedRollingArray.ts Enable @typescript-eslint/explicit-function-return-type in /src (#9788) 2023-01-12 13:25:14 +00:00
FontManager.ts Update FontManager.ts (#11673) 2023-09-27 10:34:07 +00:00
FormattingUtils.ts Migrate more strings to translation keys (#11665) 2023-09-25 18:12:41 +01:00
humanize.ts Migrate more strings to translation keys (#11512) 2023-09-04 10:20:34 +01:00
i18n-helpers.ts Consolidate conjugation i18n strings (#11660) 2023-09-25 12:18:15 +01:00
IdentityServerUtils.ts Switch to importing more things from the main js-sdk export (#11377) 2023-08-10 08:01:14 +00:00
IDestroyable.ts Use IDestroyable instead of IDisposable 2020-06-09 08:08:47 -06:00
image-media.ts Populate info.duration for audio & video file uploads (#11225) 2023-07-17 12:07:58 +00:00
Image.ts Conform more of the code base to strict null checking (#10147) 2023-02-13 17:01:43 +00:00
iterables.ts Apply prettier formatting 2022-12-12 12:24:14 +01:00
JSON.ts Fix view source and devtools showing hljs warnings (#7759) 2022-02-09 09:09:06 +00:00
KeyVerificationStateObserver.ts Migrate more strings to translation keys (#11651) 2023-09-22 16:39:40 +01:00
LazyValue.ts Improve quality of Typescript types (#10742) 2023-05-05 09:11:14 +01:00
leave-behaviour.ts Migrate more strings to translation keys (#11651) 2023-09-22 16:39:40 +01:00
local-room.ts Apply strictNullChecks to src/utils/local-room.ts (#10915) 2023-06-01 11:55:26 +00:00
login.ts Conform more code to strict null checking (#10167) 2023-02-16 17:21:44 +00:00
LruCache.ts Add UserProfilesStore, LruCache and cache for user permalink profiles (#10425) 2023-03-27 10:07:43 +02:00
maps.ts Conform more of the code base to strict null checking (#10147) 2023-02-13 17:01:43 +00:00
MarkedExecution.ts Enable @typescript-eslint/explicit-function-return-type in /src (#9788) 2023-01-12 13:25:14 +00:00
MatrixGlob.ts Enable @typescript-eslint/explicit-member-accessibility on /src (#9785) 2022-12-16 12:29:59 +00:00
MediaEventHelper.ts Switch to importing @types/{event,partials} from main js-sdk export (#11369) 2023-08-08 10:12:12 +00:00
MegolmExportEncryption.ts Migrate more strings to translation keys (#11651) 2023-09-22 16:39:40 +01:00
membership.ts Show knock rooms in the list (#11573) 2023-09-19 11:24:35 +00:00
MessageDiffUtils.tsx Switch to importing models/event from main js-sdk export (#11363) 2023-08-07 08:24:58 +00:00
Mouse.ts Conform more of the code base to strict null checking (#10147) 2023-02-13 17:01:43 +00:00
MultiInviter.ts Migrate more strings to translation keys (#11651) 2023-09-22 16:39:40 +01:00
NativeEventUtils.ts Apply prettier formatting 2022-12-12 12:24:14 +01:00
notifications.ts Consume more imports from matrix-js-sdk/src/matrix (#11449) 2023-08-23 09:04:25 +00:00
numbers.ts Fix seekbar position for zero length audio (#9949) 2023-01-23 17:28:31 +01:00
objects.ts Make existing and new issue URLs configurable (#10710) 2023-04-26 09:36:00 +00:00
pages.ts Eliminate the use of MatrixClientPeg in utils (#10910) 2023-05-23 16:24:12 +01:00
PasswordScorer.ts Switch from zxcvbn to @zxcvbn-ts (#11611) 2023-09-19 22:34:41 +01:00
pillify.tsx Switch to importing models/event from main js-sdk export (#11363) 2023-08-07 08:24:58 +00:00
PinningUtils.ts Consume more imports from matrix-js-sdk/src/matrix (#11449) 2023-08-23 09:04:25 +00:00
PreferredRoomVersions.ts Allow creating knock rooms (#11182) 2023-07-10 08:01:03 +00:00
presence.ts Eliminate the use of MatrixClientPeg in utils (#10910) 2023-05-23 16:24:12 +01:00
promise.ts Conform more of the codebase to strictNullChecks (#11134) 2023-06-27 17:39:56 +01:00
ReactUtils.tsx Comply with noImplicitAny (#9940) 2023-02-13 11:39:16 +00:00
read-receipts.ts Switch to importing client from main js-sdk export (#11370) 2023-08-09 07:18:41 +00:00
Reply.ts Consume more imports from matrix-js-sdk/src/matrix (#11449) 2023-08-23 09:04:25 +00:00
ResizeNotifier.ts Enable @typescript-eslint/explicit-function-return-type in /src (#9788) 2023-01-12 13:25:14 +00:00
rooms.ts Don't setup keys on login when encryption is force disabled (#11125) 2023-06-27 09:42:31 +00:00
RoomUpgrade.ts Migrate more strings to translation keys (#11651) 2023-09-22 16:39:40 +01:00
SearchInput.ts Allows search to recognize full room links (#8275) 2023-05-09 07:55:50 +00:00
SessionLock.ts Lock out the first tab if Element is opened in a second tab. (#11425) 2023-08-24 08:28:43 +00:00
sets.ts Apply prettier formatting 2022-12-12 12:24:14 +01:00
ShieldUtils.ts ElementR: Cross user verification (#11364) 2023-09-18 17:34:00 +01:00
Singleflight.ts Conform more of the code base to strict null checking (#10147) 2023-02-13 17:01:43 +00:00
SnakedObject.ts Avoid warning about config.json fallback keys more than once (#11307) 2023-07-24 07:36:51 +00:00
SortMembers.ts Include non-matching DMs in Spotlight recent conversations when the DM's userId is part of the search API results (#11374) 2023-08-10 17:27:24 +00:00
space.tsx Migrate more strings to translation keys (#11651) 2023-09-22 16:39:40 +01:00
StorageManager.ts Switch to importing more things from the main js-sdk export (#11394) 2023-08-14 08:58:55 +00:00
stringOrderField.ts Apply strictNullChecks to src/utils/*!exportUtils (#10455 2023-04-03 09:26:55 +01:00
strings.ts Switch from grapheme-splitter to graphemer (#11037) 2023-06-05 14:39:46 +00:00
threepids.ts Apply strictNullChecks to src/utils/*!exportUtils (#10455 2023-04-03 09:26:55 +01:00
Timer.ts Make more of the codebase conform to strict types (#10857) 2023-05-16 14:25:43 +01:00
tooltipify.tsx Improve typescript null checking in places (#10073 (#10073 2023-02-03 15:27:47 +00:00
units.ts Remove dead code (#9035) 2022-07-11 07:52:44 +02:00
UrlUtils.ts Handle all permitted url schemes in linkify (#11215) 2023-07-10 15:09:39 +00:00
UserInteractiveAuth.ts Switch to importing most things from the main matrix-js-sdk export (#11406) 2023-08-15 15:00:17 +00:00
useTooltip.tsx Enable @typescript-eslint/explicit-function-return-type in /src (#9788) 2023-01-12 13:25:14 +00:00
ValidatedServerConfig.ts Switch to importing most things from the main matrix-js-sdk export (#11406) 2023-08-15 15:00:17 +00:00
video-rooms.ts Switch to importing models/Room from main js-sdk export (#11361) 2023-08-04 07:36:16 +00:00
WellKnownUtils.ts Switch to importing client from main js-sdk export (#11370) 2023-08-09 07:18:41 +00:00
Whenable.ts Add @typescript-eslint/no-base-to-string (#10091) 2023-02-07 10:08:10 +00:00
WidgetUtils.ts Migrate more strings to translation keys (#11651) 2023-09-22 16:39:40 +01:00