Commit graph

12 commits

Author SHA1 Message Date
Michael Telatynski
c3574c2050
Switch to importing client from main js-sdk export () 2023-08-09 07:18:41 +00:00
Kerry
5636a9f7ca
Unit test logout action in MatrixChat ()
* test logout action in MatrixChat

* add restore all mocks
2023-07-28 02:25:18 +00:00
Kerry
0b0d77cbcc
OIDC: Persist details in session storage, create store ()
* 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
2023-07-20 21:30:19 +00:00
Kerry
7b3d0ad209
OIDC: Log in ()
* add delegatedauthentication to validated server config

* dynamic client registration functions

* test OP registration functions

* add stubbed nativeOidc flow setup in Login

* cover more error cases in Login

* tidy

* test dynamic client registration in Login

* comment oidc_static_clients

* register oidc inside Login.getFlows

* strict fixes

* remove unused code

* and imports

* comments

* comments 2

* util functions to get static client id

* check static client ids in login flow

* remove dead code

* OidcRegistrationClientMetadata type

* navigate to oidc authorize url

* exchange code for token

* navigate to oidc authorize url

* navigate to oidc authorize url

* test

* adjust for js-sdk code

* login with oidc native flow: messy version

* tidy

* update test for response_mode query

* tidy up some TODOs

* use new types

* add identityServerUrl to stored params

* unit test completeOidcLogin

* test tokenlogin

* strict

* whitespace

* tidy

* unit test oidc login flow in MatrixChat

* strict

* tidy

* extract success/failure handlers from token login function

* typo

* use for no homeserver error dialog too

* reuse post-token login functions, test

* shuffle testing utils around

* shuffle testing utils around

* i18n

* tidy

* Update src/Lifecycle.ts

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>

* tidy

* comment

* update tests for id token validation

* move try again responsibility

* prettier

* use more future proof config for static clients

* test util for oidcclientconfigs

* rename type and lint

* correct oidc test util

* store issuer and clientId pre auth navigation

* adjust for js-sdk changes

* update for js-sdk userstate, tidy

* update MatrixChat tests

* update tests

---------

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2023-07-11 04:09:18 +00:00
Michael Telatynski
a294ba2ad4
Conform more of the codebase to strictNullChecks + noImplicitAny () 2023-07-04 14:49:27 +01:00
Kerry
a87362a048
Unit test token login flow in MatrixChat ()
* test tokenlogin

* whitespace

* tidy

* strict
2023-06-27 23:45:11 +00:00
Kerry
79a7b9aedc
Don't setup keys on login when encryption is force disabled ()
* move shouldForceDisableEncryption to /crypto

* dont setup encryption when encryption is force disabled

* shuffle testing functions

* test post login security setup flows

* remove debug

* lint fixes

* strict fixes

* strict fixes p2

---------

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-06-27 09:42:31 +00:00
Kerry
0eda8c17d5
Unit test post-login security setup flows in MatrixChat ()
* shuffle testing functions

* test post login security setup flows

* remove debug

* strict fixes

* strict fixes p2
2023-06-22 20:57:16 +00:00
Michael Telatynski
ea0e9abc2b
Allow specifying help URLs in config.json ()
* Allow specifying help URLs in config.json

* Fix test
2023-06-14 07:45:19 +00:00
Kerry
ef8719aba7
unit test leave room action handler () 2023-05-30 22:46:08 +00:00
Kerry
530197bfcd
Move session manager out of beta ()
* remove old device manager

* undo type fix for cypress crypto

* update test case
2023-05-26 01:58:28 +00:00
Kerry
02bf39cc72
Add basic unit test setup for MatrixChat ()
* mock enough things to get to welcome page

* lint

* add simple test for view room settings action

* fussy spacing

* some strict fixes
2023-05-25 02:35:22 +00:00