共用方式為


Validators.ValidateIssuer Method

Definition

Determines if an issuer found in a SecurityToken is valid.

public static string ValidateIssuer (string issuer, Microsoft.IdentityModel.Tokens.SecurityToken securityToken, Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters);
static member ValidateIssuer : string * Microsoft.IdentityModel.Tokens.SecurityToken * Microsoft.IdentityModel.Tokens.TokenValidationParameters -> string
Public Shared Function ValidateIssuer (issuer As String, securityToken As SecurityToken, validationParameters As TokenValidationParameters) As String

Parameters

issuer
String

The issuer to validate

securityToken
SecurityToken

The SecurityToken that is being validated.

validationParameters
TokenValidationParameters

TokenValidationParameters required for validation.

Returns

The issuer to use when creating the "Claim"(s) in a "ClaimsIdentity".

Exceptions

If 'issuer' is null or whitespace and ValidateIssuer is true.

If 'issuer' failed to matched either ValidIssuer or one of ValidIssuers.

Remarks

An EXACT match is required.

Applies to