From 63109d98578cdf9abc74c540407aa44afa66d245 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B9=AF=E6=9C=AC=20=E9=96=8B?= Date: Mon, 24 Jul 2023 05:50:38 +0000 Subject: [PATCH] =?UTF-8?q?Merged=20PR=20261:=20B2C=5F1=5FPORC=5Fstg?= =?UTF-8?q?=E3=81=8C=E7=99=BA=E8=A1=8C=E3=81=97=E3=81=9FID=E3=83=88?= =?UTF-8?q?=E3=83=BC=E3=82=AF=E3=83=B3=E3=81=A7=E8=AA=8D=E8=A8=BC=E3=81=8C?= =?UTF-8?q?=E5=8F=AF=E8=83=BD=E3=81=AB=E3=81=AA=E3=82=8B=E3=82=88=E3=81=86?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E3=82=92=E8=A1=8C=E3=81=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 概要 [Task2271: B2C_1_PORC_stgが発行したIDトークンで認証が可能になるよう修正を行う](https://paruru.nds-tyo.co.jp:8443/tfs/ReciproCollection/fa4924a4-d079-4fab-9fb5-a9a11eb205f0/_workitems/edit/2271) - 型チェックからnonceを削除 - nonceを省略可能に型を修正 ## レビューポイント - 修正内容は問題ないか ## 動作確認状況 - テスト通過、型チェック通過 --- dictation_server/src/common/token/typeguard.ts | 1 - dictation_server/src/common/token/types.ts | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/dictation_server/src/common/token/typeguard.ts b/dictation_server/src/common/token/typeguard.ts index d32ecad..04d3ddb 100644 --- a/dictation_server/src/common/token/typeguard.ts +++ b/dictation_server/src/common/token/typeguard.ts @@ -10,7 +10,6 @@ export const isIDToken = ( if (token.emails === undefined) return false; if (token.exp === undefined) return false; if (token.iat === undefined) return false; - if (token.nonce === undefined) return false; return true; }; diff --git a/dictation_server/src/common/token/types.ts b/dictation_server/src/common/token/types.ts index 059afc0..43650af 100644 --- a/dictation_server/src/common/token/types.ts +++ b/dictation_server/src/common/token/types.ts @@ -30,7 +30,7 @@ export type AccessToken = { export type IDToken = { emails: string[]; - nonce: string; + nonce?: string | undefined; sub: string; // AzureAD B2C ID exp: number; // 有効期限 iat: number; // 発行日時