From f7229bfff0ed92348c6df1930fa6dbede327b324 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Wed, 25 Sep 2024 17:30:13 +0100 Subject: [PATCH] Update OIDC registration types to match latest MSC2966 state (#4432) * Update OIDC registration types to match latest MSC2966 state Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Add comment Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --------- Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/oidc/register.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/oidc/register.ts b/src/oidc/register.ts index 25c3673d3..161644a84 100644 --- a/src/oidc/register.ts +++ b/src/oidc/register.ts @@ -34,17 +34,20 @@ export type OidcRegistrationClientMetadata = { policyUri: OidcRegistrationRequestBody["policy_uri"]; }; +/** + * Request body for dynamic registration as defined by https://github.com/matrix-org/matrix-spec-proposals/pull/2966 + */ interface OidcRegistrationRequestBody { - client_name: string; + client_name?: string; client_uri: string; logo_uri?: string; - contacts: NonEmptyArray; - tos_uri: string; - policy_uri: string; + contacts?: string[]; + tos_uri?: string; + policy_uri?: string; redirect_uris?: NonEmptyArray; response_types?: NonEmptyArray; grant_types?: NonEmptyArray; - id_token_signed_response_alg: string; + id_token_signed_response_alg?: string; token_endpoint_auth_method: string; application_type: "web" | "native"; }