AuthenticatorAttestationResponse

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

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

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

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

プロパティ

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

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

AuthenticatorAttestationResponse.attestationObject (en-US) 安全なコンテキスト用読取専用

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

メソッド

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

文字列の 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

ブラウザーの互換性

BCD tables only load in the browser

関連情報