1. 開発者向けのウェブ技術
  2. Web API
  3. AuthenticatorAttestationResponse

このページはコミュニティーの尽力で英語から翻訳されました。MDN Web Docs コミュニティーについてもっと知り、仲間になるにはこちらから。

View in English Always switch to English

AuthenticatorAttestationResponse

Baseline 広く利用可能 *

この機能は広く実装されており、多くのバージョンの端末やブラウザーで動作します。2021年9月以降、すべてのブラウザーで利用可能です。

* この機能の一部は、対応レベルが異なる場合があります。

安全なコンテキスト用: この機能は一部またはすべての対応しているブラウザーにおいて、安全なコンテキスト (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);
 });

仕様書

仕様書
Web Authentication: An API for accessing Public Key Credentials - Level 3
# authenticatorattestationresponse

ブラウザーの互換性

関連情報

MDN の改良に協力

協力方法を知る

このページは MDN の貢献者によって に最終更新されました。

AltStyle によって変換されたページ (->オリジナル) /