Share via


AttestationToken.ValidateTokenAsync Method

Definition

Validate a JSON Web Token returned by the MAA.

If the caller provides a set of signers, than that set of signers will be used as the complete set of candidates for signing. If the caller does not provide a set of signers, then the ValidateTokenAsync(AttestationTokenValidationOptions, IReadOnlyList<AttestationSigner>, CancellationToken) API will a set of callers derived from the contents of the attestation token.
public virtual System.Threading.Tasks.Task<bool> ValidateTokenAsync (Azure.Security.Attestation.AttestationTokenValidationOptions options, System.Collections.Generic.IReadOnlyList<Azure.Security.Attestation.AttestationSigner> attestationSigningCertificates, System.Threading.CancellationToken cancellationToken = default);
abstract member ValidateTokenAsync : Azure.Security.Attestation.AttestationTokenValidationOptions * System.Collections.Generic.IReadOnlyList<Azure.Security.Attestation.AttestationSigner> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<bool>
override this.ValidateTokenAsync : Azure.Security.Attestation.AttestationTokenValidationOptions * System.Collections.Generic.IReadOnlyList<Azure.Security.Attestation.AttestationSigner> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<bool>
Public Overridable Function ValidateTokenAsync (options As AttestationTokenValidationOptions, attestationSigningCertificates As IReadOnlyList(Of AttestationSigner), Optional cancellationToken As CancellationToken = Nothing) As Task(Of Boolean)

Parameters

options
AttestationTokenValidationOptions

Options used while validating the attestation token.

attestationSigningCertificates
IReadOnlyList<AttestationSigner>

Signing Certificates used to validate the token.

cancellationToken
CancellationToken

Token used to cancel this operation if necessary.

Returns

true if the token was valid, false otherwise.

Exceptions

Thrown if the signing certificates provided are invalid.

Thrown if validation fails.

Applies to