Share via


AttestationToken.ValidateToken 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 ValidateToken(AttestationTokenValidationOptions, IReadOnlyList<AttestationSigner>, CancellationToken) API will a set of callers derived from the contents of the attestation token.
public virtual bool ValidateToken (Azure.Security.Attestation.AttestationTokenValidationOptions options, System.Collections.Generic.IReadOnlyList<Azure.Security.Attestation.AttestationSigner> attestationSigningCertificates, System.Threading.CancellationToken cancellationToken = default);
abstract member ValidateToken : Azure.Security.Attestation.AttestationTokenValidationOptions * System.Collections.Generic.IReadOnlyList<Azure.Security.Attestation.AttestationSigner> * System.Threading.CancellationToken -> bool
override this.ValidateToken : Azure.Security.Attestation.AttestationTokenValidationOptions * System.Collections.Generic.IReadOnlyList<Azure.Security.Attestation.AttestationSigner> * System.Threading.CancellationToken -> bool
Public Overridable Function ValidateToken (options As AttestationTokenValidationOptions, attestationSigningCertificates As IReadOnlyList(Of AttestationSigner), Optional cancellationToken As CancellationToken = Nothing) As 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