JwtTokenExtractor class

ID 情報を取得し、セキュリティ トークン検証を実行する JWT トークン処理クラス。

コンストラクター

JwtTokenExtractor(VerifyOptions, string, string[])

JwtTokenExtractor クラスの新しいインスタンスを初期化します。 JWT トークンから関連データを抽出します。

プロパティ

openIdMetadata
tokenValidationParameters

メソッド

getIdentity(string, string, string, string[])

要求に関連付けられているクレーム ID を取得します。

getIdentityFromAuthHeader(string, string, string[])

要求に関連付けられているクレーム ID を取得します。

コンストラクターの詳細

JwtTokenExtractor(VerifyOptions, string, string[])

JwtTokenExtractor クラスの新しいインスタンスを初期化します。 JWT トークンから関連データを抽出します。

new JwtTokenExtractor(tokenValidationParameters: VerifyOptions, metadataUrl: string, allowedSigningAlgorithms: string[])

パラメーター

tokenValidationParameters

VerifyOptions

トークン検証パラメーター。

metadataUrl

string

メタデータ URL。

allowedSigningAlgorithms

string[]

許可された署名アルゴリズム。

プロパティの詳細

openIdMetadata

openIdMetadata: OpenIdMetadata

プロパティ値

tokenValidationParameters

tokenValidationParameters: VerifyOptions

プロパティ値

VerifyOptions

メソッドの詳細

getIdentity(string, string, string, string[])

要求に関連付けられているクレーム ID を取得します。

function getIdentity(scheme: string, parameter: string, channelId: string, requiredEndorsements?: string[]): Promise<ClaimsIdentity | null>

パラメーター

scheme

string

関連付けられているスキーム。

parameter

string

トークン。

channelId

string

元の要求で検証されるチャネルの ID。

requiredEndorsements

string[]

必要な JWT の保証。

戻り値

Promise<ClaimsIdentity | null>

Promise ClaimsIdentity または nullのいずれかの表現。

getIdentityFromAuthHeader(string, string, string[])

要求に関連付けられているクレーム ID を取得します。

function getIdentityFromAuthHeader(authorizationHeader: string, channelId: string, requiredEndorsements?: string[]): Promise<ClaimsIdentity | null>

パラメーター

authorizationHeader

string

"Bearer [longString]" という形式の未加工の HTTP ヘッダー。

channelId

string

元の要求で検証されるチャネルの ID。

requiredEndorsements

string[]

必要な JWT の保証。

戻り値

Promise<ClaimsIdentity | null>

Promise ClaimsIdentity または nullのいずれかの表現。