AadIssuerValidator.GetAadIssuerValidator Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
GetAadIssuerValidator(String) |
Gets an AadIssuerValidator for an Azure Active Directory (AAD) authority. |
GetAadIssuerValidator(String, HttpClient) |
Gets an AadIssuerValidator for an Azure Active Directory (AAD) authority. |
GetAadIssuerValidator(String)
Gets an AadIssuerValidator for an Azure Active Directory (AAD) authority.
public static Microsoft.IdentityModel.Validators.AadIssuerValidator GetAadIssuerValidator (string aadAuthority);
static member GetAadIssuerValidator : string -> Microsoft.IdentityModel.Validators.AadIssuerValidator
Public Shared Function GetAadIssuerValidator (aadAuthority As String) As AadIssuerValidator
Parameters
- aadAuthority
- String
The authority to create the validator for, e.g. https://login.microsoftonline.com/.
Returns
A AadIssuerValidator for the aadAuthority.
Exceptions
if aadAuthority
is null or empty.
Examples
AadIssuerValidator aadIssuerValidator = AadIssuerValidator.GetAadIssuerValidator(authority);
TokenValidationParameters.IssuerValidator = aadIssuerValidator.Validate;
Applies to
GetAadIssuerValidator(String, HttpClient)
Gets an AadIssuerValidator for an Azure Active Directory (AAD) authority.
public static Microsoft.IdentityModel.Validators.AadIssuerValidator GetAadIssuerValidator (string aadAuthority, System.Net.Http.HttpClient httpClient);
static member GetAadIssuerValidator : string * System.Net.Http.HttpClient -> Microsoft.IdentityModel.Validators.AadIssuerValidator
Public Shared Function GetAadIssuerValidator (aadAuthority As String, httpClient As HttpClient) As AadIssuerValidator
Parameters
- aadAuthority
- String
The authority to create the validator for, e.g. https://login.microsoftonline.com/.
- httpClient
- HttpClient
Optional HttpClient to use to retrieve the endpoint metadata (can be null).
Returns
A AadIssuerValidator for the aadAuthority.
Exceptions
if aadAuthority
is null or empty.
Examples
AadIssuerValidator aadIssuerValidator = AadIssuerValidator.GetAadIssuerValidator(authority, httpClient);
TokenValidationParameters.IssuerValidator = aadIssuerValidator.Validate;