Package version:

Interface AttestationTokenValidationOptions

Options used to validate attestation tokens.

issuer - if provided, specifies the expected issuer of the attestation token.

validateExpirationTime - if true, validate the expiration time in the token.

validateNotBeforeTime - if true, validate the "not before" time in the token.

validateToken - if true, validate the token.

timeValidationSlack - the validation time slack in the time based validations.

If no validation options are provided, validateToken, validateExpirationTime, and validateNotBeforeTime are all true. If validation options are provided (for the clients, on the client or on the operation), an omitted validateToken is still true, but an omitted validateExpirationTime or validateNotBeforeTime is false, so that time is not checked.

interface AttestationTokenValidationOptions {
    expectedIssuer?: string;
    timeValidationSlack?: number;
    validateAttestationToken?: (
        token: AttestationToken,
        signer?: AttestationSigner,
    ) => string[] | undefined;
    validateExpirationTime?: boolean;
    validateIssuer?: boolean;
    validateNotBeforeTime?: boolean;
    validateToken?: boolean;
}
Index
expectedIssuer?: string

The expected issuer for the AttestationToken. Only checked if validateIssuer is set.

timeValidationSlack?: number

Tolerance time (in seconds) used to accound for clock drift between the local machine and the server creating the token.

validateAttestationToken?: (
    token: AttestationToken,
    signer?: AttestationSigner,
) => string[] | undefined

Validation function which allows developers to provide their own validation functionality for the attestation token. This can be used to perform additional validations for signing certificate in AttestationSigner.

Type Declaration

If there is a problem with token validation, the validateAttestationCallback function will return an array of strings indicating the set of problems found in the token.

validateExpirationTime?: boolean

If true, validate the expiration time for the token.

validateIssuer?: boolean

If true, validate the issuer of the token.

validateNotBeforeTime?: boolean

If true, validate the "not before" time for the token.

validateToken?: boolean

If true, validate the attestation token, if false, skip validation, including validateAttestationToken. Defaults to true.