From 4190e90fd2fa2a7cf845eb57157a97de38636cb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Ko=C4=8D=C3=A1rek?= <762095+michal-kocarek@users.noreply.github.com> Date: Thu, 15 Aug 2024 14:03:51 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#70303=20[oidc-prov?= =?UTF-8?q?ider]=20Type=20public=20Check.*=20constants=20by=20@michal-koca?= =?UTF-8?q?rek?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/oidc-provider/index.d.ts | 3 +++ types/oidc-provider/oidc-provider-tests.ts | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/types/oidc-provider/index.d.ts b/types/oidc-provider/index.d.ts index 392980589e3b46..8c87849ab3a7f8 100644 --- a/types/oidc-provider/index.d.ts +++ b/types/oidc-provider/index.d.ts @@ -2166,6 +2166,9 @@ export namespace interactionPolicy { } class Check { + static readonly REQUEST_PROMPT: true; + static readonly NO_NEED_TO_PROMPT: false; + constructor( reason: string, description: string, diff --git a/types/oidc-provider/oidc-provider-tests.ts b/types/oidc-provider/oidc-provider-tests.ts index 64cce8611d86c1..62c4978e9a5130 100644 --- a/types/oidc-provider/oidc-provider-tests.ts +++ b/types/oidc-provider/oidc-provider-tests.ts @@ -346,7 +346,7 @@ const provider = new oidc.Provider("https://op.example.com", { "foo", "bar", "baz", - async ctx => true, + async ctx => oidc.interactionPolicy.Check.REQUEST_PROMPT, async ctx => ({ foo: "bar" }), ), ), @@ -358,7 +358,7 @@ const provider = new oidc.Provider("https://op.example.com", { "foo", "bar", "baz", - async ctx => true, + async ctx => oidc.interactionPolicy.Check.NO_NEED_TO_PROMPT, async ctx => ({ foo: "bar" }), ), ),