AttestationToken interface

An AttestationToken represents an RFC 7515 JSON Web Signature object.

It can represent either the token returned by the attestation service, or it can be used to create a token locally which can be used to verify attestation policy changes.

Properties

algorithm

Returns the algorithm from the header of the JSON Web Signature.

See RFC 7515 Section 4.1.1) for details.

If the value of algorithm is "none" it indicates that the token is unsecured.

certificateChain

Json Web Token Header "x509 certificate chain".

See RFC 7515 Section 4.1.6)

certificateSha256Thumbprint

Json Web Token Header "x509 SHA256 thumprint".

See RFC 7515 Section 4.1.8)

certificateThumbprint

Json Web Token Header "x509 thumprint". See RFC 7515 Section 4.1.7)

contentType

Json Web Token Header "content type". See RFC 7515 Section 4.1.10)

critical

Json Web Signature Header "crit".

See RFC 7515 Section 4.1.11) for details.

expiresOn

Expiration time for the token, from JWT body.

See RFC 7519 Section 4.1.4) for details.

issuedAt

Issuance time for the token, from JWT body.

See RFC 7519 Section 4.1.6) for details.

issuer

Issuer of the attestation token. See RFC 7519 Section 4.1.6) for details.

keyId

Json Web Signature Header "kid". See RFC 7515 Section 4.1.4) for details.

keyUrl

Json Web Token Header "key URL".

See RFC 7515 Section 4.1.2)

notBefore

Not Before time for the token, from JWT body.

See RFC 7519 Section 4.1.5) for details.

type

Json Web Token Header "Typ".

See RFC 7515 Section 4.1.9)

x509Url

Json Web Token Header "X509 Url".

See RFC 7515 Section 4.1.5)

Methods

getBody()

Returns the deserialized body of the AttestationToken object.

getTokenProblems(AttestationSigner[], AttestationTokenValidationOptions)

Validates the attestation token to verify that it is semantically correct.

serialize()

the token to a string.

Property Details

algorithm

Returns the algorithm from the header of the JSON Web Signature.

See RFC 7515 Section 4.1.1) for details.

If the value of algorithm is "none" it indicates that the token is unsecured.

algorithm: string

Property Value

string

certificateChain

Json Web Token Header "x509 certificate chain".

See RFC 7515 Section 4.1.6)

certificateChain?: AttestationSigner

Property Value

certificateSha256Thumbprint

Json Web Token Header "x509 SHA256 thumprint".

See RFC 7515 Section 4.1.8)

certificateSha256Thumbprint?: string

Property Value

string

certificateThumbprint

Json Web Token Header "x509 thumprint". See RFC 7515 Section 4.1.7)

certificateThumbprint?: string

Property Value

string

contentType

Json Web Token Header "content type". See RFC 7515 Section 4.1.10)

contentType?: string

Property Value

string

critical

Json Web Signature Header "crit".

See RFC 7515 Section 4.1.11) for details.

critical?: boolean

Property Value

boolean

expiresOn

Expiration time for the token, from JWT body.

See RFC 7519 Section 4.1.4) for details.

expiresOn?: Date

Property Value

Date

issuedAt

Issuance time for the token, from JWT body.

See RFC 7519 Section 4.1.6) for details.

issuedAt?: Date

Property Value

Date

issuer

Issuer of the attestation token. See RFC 7519 Section 4.1.6) for details.

issuer?: string

Property Value

string

keyId

Json Web Signature Header "kid". See RFC 7515 Section 4.1.4) for details.

keyId?: string

Property Value

string

keyUrl

Json Web Token Header "key URL".

See RFC 7515 Section 4.1.2)

keyUrl?: string

Property Value

string

notBefore

Not Before time for the token, from JWT body.

See RFC 7519 Section 4.1.5) for details.

notBefore?: Date

Property Value

Date

type

Json Web Token Header "Typ".

See RFC 7515 Section 4.1.9)

type?: string

Property Value

string

x509Url

Json Web Token Header "X509 Url".

See RFC 7515 Section 4.1.5)

x509Url?: string

Property Value

string

Method Details

getBody()

Returns the deserialized body of the AttestationToken object.

function getBody(): unknown

Returns

unknown

The body of the attestation token as an object.

getTokenProblems(AttestationSigner[], AttestationTokenValidationOptions)

Validates the attestation token to verify that it is semantically correct.

function getTokenProblems(possibleSigners?: AttestationSigner[], options?: AttestationTokenValidationOptions): string[]

Parameters

possibleSigners

AttestationSigner[]

the set of possible signers for this attestation token.

options
AttestationTokenValidationOptions

validation options

Returns

string[]

serialize()

the token to a string.

function serialize(): string

Returns

string

The token serialized to a RFC 7515 JSON Web Signature.

Remarks

Serializes the token to a string.