From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/ja/web/api/authenticatorresponse/index.html | 119 ++++++++++++++++++++++ 1 file changed, 119 insertions(+) create mode 100644 files/ja/web/api/authenticatorresponse/index.html (limited to 'files/ja/web/api/authenticatorresponse') diff --git a/files/ja/web/api/authenticatorresponse/index.html b/files/ja/web/api/authenticatorresponse/index.html new file mode 100644 index 0000000000..98559ec234 --- /dev/null +++ b/files/ja/web/api/authenticatorresponse/index.html @@ -0,0 +1,119 @@ +--- +title: AuthenticatorResponse +slug: Web/API/AuthenticatorResponse +tags: + - API + - Authentication + - AuthenticatorResponse + - Interface + - Reference + - Web Authentication API + - WebAuthn + - インターフェイス +translation_of: Web/API/AuthenticatorResponse +--- +
{{APIRef("Web Authentication API")}}{{securecontext_header}}
+ +

AuthenticatorResponseWeb Authentication API のインターフェイスで、キーペアを信頼する暗号化ルートを提供するインターフェイスの基本インターフェイスです。子インターフェイスでは、チャレンジのオリジンなどのブラウザーからの情報を含み、 {{domxref("PublicKeyCredential.response")}} から返されることがあります。

+ +

AuthenticatorResponse に基づくインターフェイス

+ +

以下のインターフェイスは AuthenticatorResponse インターフェイスに基づいています。

+ +
+ +
+ +

プロパティ

+ +
+
{{domxref("AuthenticatorResponse.clientDataJSON")}}
+
JSON 文字列が入った {{domxref("ArrayBuffer")}} で、 {{domxref("CredentialsContainer.create()")}} または {{domxref("CredentialsContainer.get()")}} に渡されたクライアントデータを表します。
+
+ +

メソッド

+ +

なし。

+ +

+ +

AuthenticatorAssertionResponse の取得

+ +
var options = {
+  challenge: new Uint8Array([/* bytes sent from the server */])
+};
+
+navigator.credentials.get({ "publicKey": options })
+    .then(function (credentialInfoAssertion) {
+    var assertionResponse = credentialInfoAssertion.response;
+    // send assertion response back to the server
+    // to proceed with the control of the credential
+}).catch(function (err) {
+     console.error(err);
+});
+
+
+ +

AuthenticatorAttestationResponse の取得

+ +
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 attestationResponse = newCredentialInfo.response;
+  }).catch(function (err) {
+     console.error(err);
+  });
+ +

仕様書

+ + + + + + + + + + + + + + + + +
仕様書状態備考
{{SpecName('WebAuthn','#authenticatorresponse', 'AuthenticatorResponse interface')}}{{Spec2('WebAuthn')}}初回定義
+ +

ブラウザーの互換性

+ + + +

{{Compat("api.PublicKeyCredentialRequestOptions")}}

+ +

関連情報

+ + -- cgit v1.2.3-54-g00ecf