AuthenticatorAttestationResponse

Baseline Widely available *

This feature is well established and works across many devices and browser versions. It’s been available across browsers since September 2021.

* Some parts of this feature may have varying levels of support.

安全なコンテキスト用: この機能は一部またはすべての対応しているブラウザーにおいて、安全なコンテキスト (HTTPS) でのみ利用できます。

AuthenticatorAttestationResponseWeb Authentication API のインターフェイスで、 CredentialsContainer.create()PublicKeyCredential を渡すと返されます。そして、生成された新しいキーペアの暗号化信頼ルートを提供します。このレスポンスは認証情報の生成を完了させるために、信頼されている側のサーバーに送信されます。

このインターフェイスは AuthenticatorResponse を継承しています。

メモ: このインターフェイスは最上位のコンテキストに限定されています。 <iframe> 要素の中で使用しても、何も効果がありません。

プロパティ

AuthenticatorAttestationResponse.clientDataJSON 安全なコンテキスト用読取専用

認証のためのクライアントデータで、オリジンやチャレンジです。 clientDataJSON プロパティは AuthenticatorResponse から継承しています。

AuthenticatorAttestationResponse.attestationObject 安全なコンテキスト用読取専用

ArrayBuffer で、新しく生成されたキーペアのための認証機器のデータとアテステーションステートメントが入ります。

メソッド

AuthenticatorAttestationResponse.getTransports()安全なコンテキスト用

文字列の Array で、認証機器がどの転送方法 (usbnfc など) に対応していると信じられるかを記述します。情報が利用できない場合は、配列が空になることがあります。

js
var publicKey = {
  challenge: /* from the server */,
  rp: {
    name: "Example CORP",
    id  : "login.example.com"
  },
  user: {
    id: new Uint8Array(16),
    name: "jdoe@example.com",
    displayName: "John Doe"
  },
  pubKeyCredParams: [
    {
      type: "public-key",
      alg: -7
    }
  ]
};

navigator.credentials.create({ publicKey })
  .then(function (newCredentialInfo) {
    var response = newCredentialInfo.response;
    // Do something with the response
    // (sending it back to the relying party server maybe?)
  }).catch(function (err) {
     console.error(err);
  });

仕様書

Specification
Web Authentication: An API for accessing Public Key Credentials - Level 3
# authenticatorattestationresponse

ブラウザーの互換性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
AuthenticatorAttestationResponse
attestationObject
getAuthenticatorData
getPublicKey
getPublicKeyAlgorithm
getTransports

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
Partial support
Partial support
No support
No support
See implementation notes.
Has more compatibility info.

関連情報