aboutsummaryrefslogtreecommitdiff
path: root/files/ja/web/api/publickeycredential/rawid
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
commit33058f2b292b3a581333bdfb21b8f671898c5060 (patch)
tree51c3e392513ec574331b2d3f85c394445ea803c6 /files/ja/web/api/publickeycredential/rawid
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/ja/web/api/publickeycredential/rawid')
-rw-r--r--files/ja/web/api/publickeycredential/rawid/index.html85
1 files changed, 85 insertions, 0 deletions
diff --git a/files/ja/web/api/publickeycredential/rawid/index.html b/files/ja/web/api/publickeycredential/rawid/index.html
new file mode 100644
index 0000000000..2d05c2892b
--- /dev/null
+++ b/files/ja/web/api/publickeycredential/rawid/index.html
@@ -0,0 +1,85 @@
+---
+title: PublicKeyCredential.rawId
+slug: Web/API/PublicKeyCredential/rawId
+tags:
+ - API
+ - Property
+ - PublicKeyCredential
+ - Reference
+ - Web Authentication API
+ - WebAuthn
+ - プロパティ
+translation_of: Web/API/PublicKeyCredential/rawId
+---
+<div>{{APIRef("Web Authentication API")}}{{securecontext_header}}</div>
+
+<p><strong><code>rawId</code></strong> は {{domxref("PublicKeyCredential")}} インターフェイスの読み取り専用プロパティで、証明書の識別子が入った {{jsxref("ArrayBuffer")}} オブジェクトです。</p>
+
+<p>{{domxref("PublicKeyCredential.id")}} プロパティはこの識別子が <a href="/ja/docs/Web/API/WindowBase64/Base64_encoding_and_decoding">base64url エンコード</a>されたものです。</p>
+
+<div class="note">
+<p><strong>メモ:</strong> このプロパティは最上位のコンテキストでしか使えない可能性があり、例えば {{HTMLElement("iframe")}} の中では利用できません。</p>
+</div>
+
+<h2 id="Syntax" name="Syntax">構文</h2>
+
+<pre class="syntaxbox"><var>rawId</var> = <var>publicKeyCredential</var>.rawId</pre>
+
+<h3 id="Value" name="Value">値</h3>
+
+<p>{{jsxref("ArrayBuffer")}} で、証明書の識別子が入っています。この識別子はグローバルに固有で、現在の <code>PublicKeyCredential</code> および関連する {{domxref("AuthenticatorAssertionResponse")}} を指しています。</p>
+
+<h2 id="Examples" name="Examples">例</h2>
+
+<pre class="brush: js">var options = {
+ challenge: new Uint8Array(26) /* from the server */,
+ rp: {
+ name: "Example CORP",
+ id : "login.example.com"
+ },
+ user: {
+ id: new Uint8Array(26), /* To be changed for each user */
+ name: "jdoe@example.com",
+ displayName: "John Doe",
+ },
+ pubKeyCredParams: [
+ {
+ type: "public-key",
+ alg: -7
+ }
+ ]
+};
+
+navigator.credentials.create({ publickey: options })
+ .then(function (pubKeyCredential) {
+ var rawId = pubKeyCredential.rawId;
+ // Do something with rawId
+}).catch(function (err) {
+ // Deal with any error
+});
+</pre>
+
+<h2 id="Specifications" name="Specifications">仕様書</h2>
+
+<table class="standard-table">
+ <thead>
+ <tr>
+ <th scope="col">仕様書</th>
+ <th scope="col">状態</th>
+ <th scope="col">備考</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>{{SpecName('WebAuthn','#dom-publickeycredential-rawid','rawId')}}</td>
+ <td>{{Spec2('WebAuthn')}}</td>
+ <td>初回定義</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Browser_compatibility" name="Browser_compatibility">ブラウザーの対応</h2>
+
+<div class="hidden">このページの互換性一覧表は構造化データから生成されています。データに協力していただけるのであれば、 <a class="external" href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> をチェックアウトしてプルリクエストを送信してください。</div>
+
+<p>{{Compat("api.PublicKeyCredential.rawId")}}</p>