1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-25 05:23:13 +03:00

OIDC: Validate m.authentication configuration (#3419)

* validate m.authentication, fetch issuer wellknown

* move validation functions into separate file

* test validateWellKnownAuthentication

* test validateOIDCIssuerWellKnown

* add authentication cases to autodiscovery tests

* test invalid authentication config on wk

* improve types

* test case for account:false

* use hasOwnProperty in validateWellKnownAuthentication

* comments

* make registration_endpoint optional
This commit is contained in:
Kerry
2023-06-12 09:32:44 +12:00
committed by GitHub
parent 2766146c49
commit c66850e897
5 changed files with 458 additions and 10 deletions

View File

@@ -592,8 +592,8 @@ export interface IClientWellKnown {
[M_AUTHENTICATION.name]?: IDelegatedAuthConfig; // MSC2965
}
export interface IWellKnownConfig {
raw?: IClientWellKnown;
export interface IWellKnownConfig<T = IClientWellKnown> {
raw?: T;
action?: AutoDiscoveryAction;
reason?: string;
error?: Error | string;