Back to Content

AuthenticatorAttestationResponse: attestationObject property

files/en-us/web/api/authenticatorattestationresponse/attestationobject/index.md

latest3.0 KB
Original Source

{{APIRef("Web Authentication API")}}{{securecontext_header}}

The attestationObject property of the {{domxref("AuthenticatorAttestationResponse")}} interface returns an {{jsxref("ArrayBuffer")}} containing the new public key, as well as signature over the entire attestationObject with a private key that is stored in the authenticator when it is manufactured.

As part of the {{domxref("CredentialsContainer.create()")}} call, an authenticator will create a new key pair as well as an attestationObject for that key pair. The public key that corresponds to the private key that has created the attestation signature is well known; however, there are various well known attestation public key chains for different ecosystems (for example, Android or TPM attestations).

Value

After decoding the CBOR encoded ArrayBuffer, the resulting JavaScript object will contain the following properties:

  • authData

    • : The Authenticator data for the operation. Note that in {{domxref("AuthenticatorAssertionResponse")}}, the authenticatorData is exposed as a property in a JavaScript object (see {{domxref("AuthenticatorAssertionResponse.authenticatorData")}}) while in {{domxref("AuthenticatorAttestationResponse")}}, the authenticatorData is a property in a CBOR map.

      The same {{domxref("AuthenticatorAssertionResponse.authenticatorData")}} field is used by both AuthenticatorAttestationResponse and by AuthenticatorAssertionResponse. When used in attestation, it contains an optional field, attestedCredentialData. This field is not included when used in the AuthenticatorAssertionResponse. The attestedCredentialData field contains the credentialId and credentialPublicKey.

  • fmt

  • attStmt

Examples

See Creating a public key credential for a detailed example.

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}

See also

  • {{domxref("CredentialsContainer.create()")}}: the method used to create a statement with a cryptographic challenge which signature by the authenticator is contained in attStmt, with the specified attestation transport option.