From a065e04d529da1d847b5062a12c46d916408bf32 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 21:46:22 -0500 Subject: update based on https://github.com/mdn/yari/issues/2028 --- files/ja/web/api/identitymanager/get/index.html | 48 ------- .../identitymanager/getverifiedemail/index.html | 40 ------ files/ja/web/api/identitymanager/index.html | 45 ------- files/ja/web/api/identitymanager/logout/index.html | 40 ------ .../ja/web/api/identitymanager/request/index.html | 75 ----------- files/ja/web/api/identitymanager/watch/index.html | 143 --------------------- 6 files changed, 391 deletions(-) delete mode 100644 files/ja/web/api/identitymanager/get/index.html delete mode 100644 files/ja/web/api/identitymanager/getverifiedemail/index.html delete mode 100644 files/ja/web/api/identitymanager/index.html delete mode 100644 files/ja/web/api/identitymanager/logout/index.html delete mode 100644 files/ja/web/api/identitymanager/request/index.html delete mode 100644 files/ja/web/api/identitymanager/watch/index.html (limited to 'files/ja/web/api/identitymanager') diff --git a/files/ja/web/api/identitymanager/get/index.html b/files/ja/web/api/identitymanager/get/index.html deleted file mode 100644 index 1d772fd295..0000000000 --- a/files/ja/web/api/identitymanager/get/index.html +++ /dev/null @@ -1,48 +0,0 @@ ---- -title: navigator.id.get -slug: Web/API/IdentityManager/get -tags: - - BrowserID - - DOM - - Gecko DOM Reference - - Persona - - Security -translation_of: Archive/IdentityManager/get ---- -
- {{ ApiRef }} {{ non-standard_header }}
-
- 注記: この機能は、まだどのブラウザでもサポートされていません。Persona を使用する Web サイトは、そのページに ポリフィルライブラリ を含めなければなりません。
-

要約

-

この関数は、Web サイトが Persona を使用してユーザの認証ができるようにします。この関数は、コールバック関数を引数に指定した "log in with Persona" ボタンの click ハンドラから呼び出してください。

-

navigator.id.get() は、サインインに使用するメールアドレスの選択をユーザに求めます。ユーザの証明書が期限切れの場合は、Persona のパスワードも求めます。その後、ユーザのメールアドレスとパスワードを含む署名付きの アサーション が生成され、コールバックに渡されます。

-

何らかの理由で署名付きのアサーションが生成できないとき (例えば、ユーザがログインをキャンセルした場合や間違ったパスワードを入力した場合) は、コールバック関数に NULL が渡されて呼び出されます。

-

コールバックが署名付きのアサーションを受け取ったら、検証のためにそれをサーバに送信してください。

-

構文

-
navigator.id.get(gotAssertion);
-navigator.id.get(gotAssertion, {privacyPolicy: "/privacy.html", termsOfService: "/tos.html"});
-

引数

-
-
- gotAssertion
-
- 署名付きのアサーションオブジェクトまたは NULL を引数に持つ関数。コールバック関数で、検証のためにアサーションをサーバに送信してください。
-
- privacyPolicy {{ optional_inline() }}
-
- Web サイトのプライバシーポリシーのページへの絶対パスまたは URL。この引数を指定する場合、termsOfService も指定しなければなりません。termsOfServiceprivacyPolicy の両方を与えた場合、ログインダイアログに "you confirm that you accept this site's Terms of Use and Privacy Policy." というメッセージを表示してサイトの利用規約とプライバシーポリシーを知らせます。これには、それぞれのページへのリンクが含まれます。termsOfService が指定されない場合、この引数は効果がありません。
-
- termsOfService {{ optional_inline() }}
-
- Web サイトの利用規約のページへの絶対パスまたは URL。この引数を指定する場合、privacyPolicy も指定しなければなりません。termsOfServiceprivacyPolicy の両方を与えた場合、ログインダイアログに "you confirm that you accept this site's Terms of Use and Privacy Policy." というメッセージを表示してサイトの利用規約とプライバシーポリシーを知らせます。これには、それぞれのページへのリンクが含まれます。privacyPolicy が指定されない場合、この引数は効果がありません。
-
-

コード例

-

例が必要。

-

仕様

-

まだどの仕様書にも含まれていません。

-

参照

- diff --git a/files/ja/web/api/identitymanager/getverifiedemail/index.html b/files/ja/web/api/identitymanager/getverifiedemail/index.html deleted file mode 100644 index ba681461a2..0000000000 --- a/files/ja/web/api/identitymanager/getverifiedemail/index.html +++ /dev/null @@ -1,40 +0,0 @@ ---- -title: navigator.id.getVerifiedEmail -slug: Web/API/IdentityManager/getVerifiedEmail -tags: - - BrowserID - - DOM - - Gecko DOM Reference - - Persona - - Security -translation_of: Archive/IdentityManager/getVerifiedEmail ---- -
- {{ ApiRef }} {{ non-standard_header }} {{ deprecated_header }}
-
- 注記: この機能は、まだどのブラウザでもサポートされていません。Persona を使用する Web サイトは、そのページに ポリフィルライブラリ を含めなければなりません。
-

要約

-

この関数は、Web サイトが BrowserID を使用してユーザの認証ができるようにします。この関数は、コールバック関数を引数に指定した "log in with BrowserID" ボタンの click ハンドラから呼び出してください。

-

navigator.id.getVerifiedEmail() は、サインインに使用するメールアドレスの選択をユーザに求めます。ユーザの証明書が期限切れの場合は、BrowserID のパスワードも求めます。その後、ユーザのメールアドレスとパスワードを含む署名付きの アサーション が生成され、コールバックに渡されます。

-

何らかの理由で署名付きのアサーションが生成できないとき (例えば、ユーザがログインをキャンセルした場合や間違ったパスワードを入力した場合) は、コールバック関数に NULL が渡されて呼び出されます。

-

コールバックが署名付きのアサーションを受け取ったら、検証のためにそれをサーバに送信してください。

-

構文

-
window.navigator.id.getVerifiedEmail(gotAssertion);
-

引数

-
-
- gotAssertion
-
- 署名付きのアサーションオブジェクトまたは NULL を引数に持つコールバック関数。コールバック関数では、検証のためにアサーションをサーバに送信してください。
-
-

コード例

-

例が必要。

-

仕様

-

まだどの仕様書にも含まれていません。

-

参照

- diff --git a/files/ja/web/api/identitymanager/index.html b/files/ja/web/api/identitymanager/index.html deleted file mode 100644 index 561c8e450e..0000000000 --- a/files/ja/web/api/identitymanager/index.html +++ /dev/null @@ -1,45 +0,0 @@ ---- -title: IdentityManager -slug: Web/API/IdentityManager -tags: - - API -translation_of: Archive/IdentityManager ---- -

{{APIRef("Persona")}}{{non-standard_header}}

- -

The IdentityManager of the  BrowserID protocol exposes the BrowserID API, via {{domxref("navigator.id")}}. This API has gone through several significant revisions. Each generation is listed separately below.

- -

The "Observer" API (Current)

- -

The Observer API introduces much-requested features, such as an improved post-verification experience for first-time users, automatic persistent logins, and easier integration with native applications.

- -
-
{{ domxref("IdentityManager.watch()")}}
-
Registers callbacks to be invoked when a user logs into or out of a website.
-
{{ domxref("IdentityManager.request()")}}
-
Requests a signed identity assertion from the user.
-
{{ domxref("IdentityManager.logout()")}}
-
Logs the user out of a website and prevents the onlogin action from automatically firing on their next visit.
-
- -
-

Users with third-party cookies disabled may experience problems logging in using the Observer API as detailed in issue 2999.

-
- -

The "Callback" API (Current)

- -

The Callback API was introduced in November 2011. It improved upon the initial API by allowing options to be passed to navigator.id.get() and offering experimental support for BrowserID-managed persistent sessions.

- -
-
{{ domxref("IdentityManager.get()")}}
-
Gets the user's BrowserID in a signed assertion.
-
- -

The "VerifiedEmail" API (Deprecated)

- -

The VerifiedEmail API was BrowserID's first API. It was deprecated at the end of 2011.

- -
-
{{ domxref("IdentityManager.getVerifiedEmail()")}} {{ deprecated_inline() }}
-
Gets the user's BrowserID in a signed assertion. This method is deprecated; {{ domxref("navigator.id.get()")}} is backwards compatible and can be used instead.
-
diff --git a/files/ja/web/api/identitymanager/logout/index.html b/files/ja/web/api/identitymanager/logout/index.html deleted file mode 100644 index e235472220..0000000000 --- a/files/ja/web/api/identitymanager/logout/index.html +++ /dev/null @@ -1,40 +0,0 @@ ---- -title: navigator.id.logout -slug: Web/API/IdentityManager/logout -tags: - - BrowserID - - DOM - - Gecko DOM Reference - - Persona - - Security -translation_of: Archive/IdentityManager/logout ---- -
- {{ ApiRef() }} {{ non-standard_header() }}
-
- 注記: この機能は、まだどのブラウザでもサポートされていません。Persona を使用する Web サイトは、そのページに ポリフィルライブラリ を含めなければなりません。
-

要約

-

この関数は、Persona で、Web サイトに対する自動的なログインの持続フラグをリセットするために使用します。この関数が呼び出された後、サイトに自動的にサインインされなくなるので、ユーザが明示的にログインしなおす必要があります。

-

Web サイトは、この関数をサイトの "log out" ボタンの click ハンドラから呼び出さなければなりません。

-

この関数は、ユーザの証明書や署名キーをブラウザに 消去させません。そのため、logout() を呼び出した後、ユーザの ID プロバイダが与えた証明書の新しさに依存して、新たなログインの時に新しいパスワードをユーザに求めたり求めなかったりします。しかし、サインインに使用するメールアドレスの選択は求められます。

-

構文

-
navigator.id.logout();
-

コード例

-
// ユーザが "Sign Out" をクリックした時に navigator.id.logout(); を実行する
-var signoutLink = document.getElementById('signout');
-
-if (signoutLink) {
-  signoutLink.onclick = function(event) {
-    event.preventDefault();
-    navigator.id.logout();
-  };
-};
-

仕様

-

まだどの仕様書にも含まれていません。

-

関連情報

- diff --git a/files/ja/web/api/identitymanager/request/index.html b/files/ja/web/api/identitymanager/request/index.html deleted file mode 100644 index df3d91bdeb..0000000000 --- a/files/ja/web/api/identitymanager/request/index.html +++ /dev/null @@ -1,75 +0,0 @@ ---- -title: navigator.id.request -slug: Web/API/IdentityManager/request -tags: - - BrowserID - - DOM - - Gecko DOM Reference - - Persona - - Security -translation_of: Archive/IdentityManager/request ---- -
- {{ ApiRef }} {{ non-standard_header }}
-
- 注記: この機能は、まだどのブラウザでもサポートされていません。Persona を使用する Web サイトは、そのページに ポリフィルライブラリ を含めなければなりません。
-

概要

-

この関数は、Web サイトが Persona を使用してユーザの認証ができるようにします。この関数は click ハンドラから呼び出されなければなりません。例えば、ユーザがページ上の「log in with Persona」ボタンをクリックした時に呼び出します。

-

呼び出された時、navigator.id.request() がユーザにログインするメールアドレスを選択するように求め、さらにユーザの証明書が期限切れの場合は ID プロバイダで認証するように求めます。これらが完了した後、ユーザのメールアドレスとパスワードを含む署名付きの アサーション が生成されます。このアサーションは、{{domxref("navigator.id.watch()")}} で登録された onlogin コールバックに渡されます。

-

この関数は、{{domxref("navigator.id.watch()")}} と連動して 使用されなければなりません

-

構文

-
navigator.id.request();
-navigator.id.request({siteName: 'Example Site', siteLogo: '/logo.png'});
-navigator.id.request({termsOfService: '/tos.html', privacyPolicy: '/privacy.html'});
-
-

引数

-
-
- oncancel {{ optional_inline() }}
-
- この関数は、ユーザが ID をサイトと共有することを拒否した場合に呼び出されます。
-
- privacyPolicy {{ optional_inline() }}
-
- Web サイトのプライバシーポリシーのページへの絶対パスまたは URL。この引数を指定する場合、termsOfService も指定しなければなりません。termsOfServiceprivacyPolicy の両方を与えた場合、ログインダイアログに "you confirm that you accept this site's Terms of Use and Privacy Policy." というメッセージを表示してサイトの利用規約とプライバシーポリシーを知らせます。これには、それぞれのページへのリンクが含まれます。termsOfService が指定されない場合、この引数は効果がありません。
-
- returnTo {{ optional_inline() }}
-
- 新しいユーザが最初にメールアドレスの検証を完了した後に表示されるページへの絶対パス。パスは '/' で始めなければなりません。この引数は、Mozilla のフォールバック ID プロバイダにより証明されたユーザにのみ影響します。
-
- siteLogo {{ optional_inline() }}
-
- ログインダイアログに表示する、画像への絶対パス。パスは '/' で始めなければなりません。また、SSL 経由の読み込みが可能でなければなりません。大きなサイズの画像は 100×100 ピクセルに収まるサイズに縮小されます。
-
- siteName {{ optional_inline() }}
-
- ログインダイアログに表示する、サイトのプレーンテキスト表記。Unicode 文字列とスペースは使えますが、マークアップはできません。
-
- termsOfService {{ optional_inline() }}
-
- Web サイトの利用規約のページへの絶対パスまたは URL。この引数を指定する場合、privacyPolicy も指定しなければなりません。termsOfServiceprivacyPolicy の両方を与えた場合、ログインダイアログに "you confirm that you accept this site's Terms of Use and Privacy Policy." というメッセージを表示してサイトの利用規約とプライバシーポリシーを知らせます。これには、それぞれのページへのリンクが含まれます。privacyPolicy が指定されない場合、この引数は効果がありません。
-
-

-
var signinLink = document.getElementById('signin');
-if (signinLink) {
-  signinLink.onclick = function(evt) {
-    // ユーザから署名付き ID アサーションを要求する
-    navigator.id.request({
-      siteName: 'My Example Site',
-      siteLogo: '/logo.png',
-      termsOfService: '/tos.html',
-      privacyPolicy: '/privacy.html',
-      returnTo: '/welcome.html',
-      oncancel: function() { alert('ユーザが ID の共有を拒否しました。'); }
-    });
-  };
-}
-

仕様

-

まだどの仕様書にも含まれていません。

-

関連情報

- diff --git a/files/ja/web/api/identitymanager/watch/index.html b/files/ja/web/api/identitymanager/watch/index.html deleted file mode 100644 index 7daf89d3ac..0000000000 --- a/files/ja/web/api/identitymanager/watch/index.html +++ /dev/null @@ -1,143 +0,0 @@ ---- -title: navigator.id.watch -slug: Web/API/IdentityManager/watch -tags: - - BrowserID - - DOM - - Persona -translation_of: Archive/IdentityManager/watch ---- -
{{ApiRef}} {{non-standard_header}}
- -
注記: この機能は、まだどのブラウザでもサポートされていません。Persona を使用する Web サイトは、そのページに ポリフィルライブラリ を含めなければなりません。
- -

概要

- -

この関数は、Persona ユーザのログインとログアウトに応答するコールバックを登録します。

- -

構文

- -
navigator.id.watch({
-  loggedInUser: 'bob@example.org',
-  onlogin: function(assertion) {
-    // ユーザがログインしました! ここで必要なことは:
-    // 1. 検証とセッション作成のためのアサーションをバックエンドに送信する。
-    // 2. UI を更新する。
-  },
-  onlogout: function() {
-    // ユーザがログアウトしました! ここで必要なことは:
-    // リダイレクトするかバックエンドの呼び出しを行って、ユーザのセッションを破棄する。
-  }
-});
-
- -

引数

- -
-
loggedInUser {{optional_inline}}
-
このパラメーターはユーザーの状態がどうなっているはずであるかを Persona に伝えるものです。値は文字列か null あるいは undefined です。
-
文字列はユーザーがサイトに現在ログインしているはずであることを表します。この文字列はそのユーザーの E-mail アドレスであって,大文字/小文字は区別します。null は誰もログインしていないはずであることを表します。このパラメーターを省略するか,あるいは undefined を与えるのは,ユーザーがログインしているか否か不明であることを意味します。
-
Persona は常に,ユーザーはサイトにログインしたいか,あるいはしたくないのだと考えています。Persona は loggedInUser の値を自らの信ずるところ(訳注:Persona が認識しているユーザー)と比較し,この二つの状態を一致させるため,(以下の表のごとくに)適切な関数を呼び出します:
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
loggedInUserPersona's StateCallback
null"foo@example.com"onlogin()
undefined"foo@example.com"onlogin()
"bar@example.com""foo@example.com"onlogin()
"foo@example.com""foo@example.com"none
nullnullnone
"foo@example.com"nullonlogout()
undefinednullonlogout()
-
-
ページが読み込まれた時に Persona が自動的に呼び出すのは onloginonlogoutどちらか であることに注意してください。両方 呼ばれることはありません(訳注:表のとおりどちらも呼ばれないことはある)。loggedInUserfoo@example.com がセットされているのに、Persona が bar@example.com がログインしていると認識している場合、onlogin のみが呼び出されます。この場合、第1引数として bar@example.com のアサーションが渡されます。
-
onlogin
-
ユーザがログインした時に、1 個の引数としてアサーションが渡され、呼び出される関数。この関数は、検証のためにアサーションをサイトのバックエンドに送信します。検証が成功した場合、バックエンドでユーザのセッションを確立し、この関数内で UI (ログインボタン) を適切なものに更新してください。
-
onlogout {{ optional_inline() }}
-
ユーザがログアウトした時に、引数なしで呼び出される関数。この関数で、サイトのバックエンドを呼び出すかユーザをリダイレクトすることにより、ユーザのセッションを破棄してください。
-
onlogout が与えられなかったとき Observer API によるセッション管理は無効化されます。onreadyonlogin だけが呼び出されます。onlogin は、ユーザーによるログイン操作の反応としてしか呼び出されません(つまりユーザーがログインしていた場合に自動的に呼び出されたりはしません)。
-
onready {{ optional_inline() }}
-
A function that will be invoked when the user agent is initialized and able to process calls to id.request and id.logout. The onready callback will be invoked immediately after any automatic invocations of onlogin, onlogout, or onmatch. By waiting to display UI until onready is called, relying parties can avoid UI flicker in cases where the user agent's preferred state is out of sync with the site's session.
-
Note that onready will not be invoked after calls to id.request or id.logout. It is the punctuation mark that concludes the conversation started by watch.
-
- -

コード例

- -
-
navigator.id.watch({
-  loggedInUser: currentUser, // This is email of current user logged into your site
-
-  onlogin: function(assertion) {
-
-    $.ajax({ // This example uses jQuery, but you can use whatever you'd like
-      type: 'POST',
-      url: '/auth/login', // This is a URL on your website.
-      data: {assertion: assertion}
-      success: function(res, status, xhr) { window.location.reload(); },
-      error: function(xhr, status, err) {
-        navigator.id.logout();
-        alert("Login failure: " + err);
-      }
-    });
-  },
-
-  onlogout: function() {
-    $.ajax({
-      type: 'POST',
-      url: '/auth/logout', // This is a URL on your website.
-      success: function(res, status, xhr) { window.location.reload(); },
-      error: function(xhr, status, err) { alert("Logout failure: " + err); }
-    });
-  }
-
-});
-
- -

仕様

- -

まだどの仕様書にも含まれていません。

- -

関連情報

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