AuthenticatorAttestationResponse
Baseline
Widely available
*
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2021年9月.
* Some parts of this feature may have varying levels of support.
安全なコンテキスト用: この機能は一部またはすべての対応しているブラウザーにおいて、安全なコンテキスト (HTTPS) でのみ利用できます。
AuthenticatorAttestationResponse は Web Authentication API のインターフェイスで、 CredentialsContainer.create() に PublicKeyCredential を渡すと返されます。そして、生成された新しいキーペアの暗号化信頼ルートを提供します。このレスポンスは認証情報の生成を完了させるために、信頼されている側のサーバーに送信されます。
このインターフェイスは AuthenticatorResponse を継承しています。
メモ:
このインターフェイスは最上位のコンテキストに限定されています。 <iframe> 要素の中で使用しても、何も効果がありません。
プロパティ
AuthenticatorAttestationResponse.clientDataJSON安全なコンテキスト用読取専用-
認証のためのクライアントデータで、オリジンやチャレンジです。
clientDataJSONプロパティはAuthenticatorResponseから継承しています。 AuthenticatorAttestationResponse.attestationObject安全なコンテキスト用読取専用-
ArrayBufferで、新しく生成されたキーペアのための認証機器のデータとアテステーションステートメントが入ります。
メソッド
AuthenticatorAttestationResponse.getTransports()安全なコンテキスト用-
文字列の
Arrayで、認証機器がどの転送方法 (usbやnfcなど) に対応していると信じられるかを記述します。情報が利用できない場合は、配列が空になることがあります。
例
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> |
ブラウザーの互換性
Loading…
関連情報
AuthenticatorAssertionResponse: 既存の認証情報を受け取る際にレスポンスの種類のインターフェイスAuthenticatorResponse: 親インターフェイス