* 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>
* Move `mediaDevices` mock out of `setupManualMocks`
This doesn't work well in test suites with multiple tests, because the
`mockReturnValue` is reset for subsequent tests.
In any case, having it mocked out automagically is *magical*. Let's make it
opt-in.
* clarify ts-ignore
* Switch to importing TypedEventEmitter from main js-sdk export
* Switch to importing js-sdk/matrix in cypress
* Remove duplicated imports
* Fix lint:js-fix to run prettier last otherwise ESLint --fix may cause a mess
* Add lint rule
* Switch to importing models/Room from main js-sdk export
* Switch to importing models/room-state & models/room-member from main js-sdk export
* Fix cypress-axe import
* Fix more imports
* Fix cypress-axe import
* Fix bad merge
* Switch to importing TypedEventEmitter from main js-sdk export
* Switch to importing js-sdk/matrix in cypress
* Remove duplicated imports
* Fix lint:js-fix to run prettier last otherwise ESLint --fix may cause a mess
* Add lint rule
* Switch to importing models/Room from main js-sdk export
* Fix cypress-axe import
* Fix more imports
* Fix cypress-axe import
* Fix duplicated lint rule
* Switch to importing TypedEventEmitter from main js-sdk export
* Switch to importing js-sdk/matrix in cypress
* Remove duplicated imports
* Fix lint:js-fix to run prettier last otherwise ESLint --fix may cause a mess
* Add lint rule
* Fix cypress-axe import
* Fix cypress-axe import
* 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
* format
* autoapprove Element Call oidc requests
Signed-off-by: Timo K <toger5@hotmail.de>
* update comment
Signed-off-by: Timo K <toger5@hotmail.de>
* add tests for oidc element-call
Signed-off-by: Timo K <toger5@hotmail.de>
* fix ES lint
Signed-off-by: Timo K <toger5@hotmail.de>
---------
Signed-off-by: Timo K <toger5@hotmail.de>
* Pass device id to widget
Implement the [comment in MSC 3819](https://github.com/matrix-org/matrix-spec-proposals/pull/3819#discussion_r1099833846) which requests passing a device id to a widget.
This is based on the previous work in the matrix-widget-api: https://github.com/matrix-org/matrix-widget-api/pull/78
Signed-off-by: Oliver Sand <oliver.sand@nordeck.net>
* Include all data that is shared in the permissions screen
* Update matrix-widget-api to version 1.4.0
Signed-off-by: Dominik Henneke <dominik.henneke@nordeck.net>
* Fix type and test
Signed-off-by: Dominik Henneke <dominik.henneke@nordeck.net>
---------
Signed-off-by: Oliver Sand <oliver.sand@nordeck.net>
Signed-off-by: Dominik Henneke <dominik.henneke@nordeck.net>
Co-authored-by: Dominik Henneke <dominik.henneke@nordeck.net>
* muted-to-the-bottom POC
* split muted rooms in natural algorithm
* add previous event to account data dispatch
* add muted to notification state
* sort muted rooms to the bottom
* only split muted rooms when sorting is RECENT
* remove debugs
* use RoomNotifState better
* add default notifications test util
* test getChangedOverrideRoomPushRules
* remove file
* test roomudpate in roomliststore
* unit test ImportanceAlgorithm
* strict fixes
* test recent x importance with muted rooms
* unit test NaturalAlgorithm
* test naturalalgorithm with muted rooms
* strict fixes
* comments
* add push rules test utility
* strict fixes
* more strict
* tidy comment
* document previousevent on account data dispatch event
* simplify (?) room mute rule utilities, comments
* remove debug
* Add an action to search for users in the user directory according to MSC3973
Signed-off-by: Dominik Henneke <dominik.henneke@nordeck.net>
* Fix linter errors
Signed-off-by: Dominik Henneke <dominik.henneke@nordeck.net>
* Update the matrix-widget-api package to version 1.3.0
Signed-off-by: Dominik Henneke <dominik.henneke@nordeck.net>
* Improve the test
Signed-off-by: Dominik Henneke <dominik.henneke@nordeck.net>
---------
Signed-off-by: Dominik Henneke <dominik.henneke@nordeck.net>
* Support dynamic room predecessors in WidgetLayoutStore
* Improve TS correctness in WidgetLayoutStore
* Test to cover onNotReady to quieten SonarCloud
---------
Co-authored-by: Janne Mareike Koschinski <janne@kuschku.de>