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. |
certificate |
Json Web Token Header "x509 certificate chain". |
certificate |
Json Web Token Header "x509 SHA256 thumprint". |
certificate |
Json Web Token Header "x509 thumprint". See RFC 7515 Section 4.1.7) |
content |
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. |
expires |
Expiration time for the token, from JWT body. See RFC 7519 Section 4.1.4) for details. |
issued |
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. |
key |
Json Web Signature Header "kid". See RFC 7515 Section 4.1.4) for details. |
key |
Json Web Token Header "key URL". |
not |
Not Before time for the token, from JWT body. See RFC 7519 Section 4.1.5) for details. |
type | Json Web Token Header "Typ". |
x509Url | Json Web Token Header "X509 Url". |
Methods
get |
Returns the deserialized body of the AttestationToken object. |
get |
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".
certificateChain?: AttestationSigner
Property Value
certificateSha256Thumbprint
Json Web Token Header "x509 SHA256 thumprint".
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
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
x509Url
Json Web Token Header "X509 Url".
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
the set of possible signers for this attestation token.
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.