element-portable/src/utils/oidc
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
..
authorize.ts OIDC: register (#11727) 2023-10-11 21:44:46 +00:00
getDelegatedAuthAccountUrl.ts OIDC: disable multi session signout for OIDC-aware servers in session manager (#11431) 2023-08-22 02:25:34 +00:00
getOidcLogoutUrl.ts OIDC: Redirect to delegated auth provider when signing out (#11432) 2023-08-22 11:15:35 +00:00
isUserRegistrationSupported.ts OIDC: register (#11727) 2023-10-11 21:44:46 +00:00
persistOidcSettings.ts OIDC: refresh tokens (#11699) 2023-10-12 00:49:07 +00:00
registerClient.ts use more future proof config for static clients (#11175) 2023-07-04 23:10:03 +00:00
TokenRefresher.ts OIDC: refresh tokens (#11699) 2023-10-12 00:49:07 +00:00