Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

IdentityManager.getVerifiedEmail()

Наши волонтёры ещё не перевели данную статью на Русский. Присоединяйтесь к нам и помогите закончить эту работу!

Not native
This feature is not built into all browsers. To use it reliably, you'll need to include a JavaScript library in your page as a polyfill. You can include the library from https://login.persona.org/include.js.

Note: This function has been deprecated in favor of navigator.id.get(), which has the same behavior, additional options, and a shorter name.

Summary

This function enables a web site to use BrowserID to authenticate its users. Call it in the click handler to your "log in with BrowserID" button with a callback function as a parameter.

navigator.id.getVerifiedEmail() will ask the user to choose an email address to sign in with, and may ask the user for their BrowserID password if the user's certificate has expired. It will then generate a signed assertion containing the user's email address, passing the assertion into the callback.

If for any reason the signed assertion cannot be generated (for example, if the user opts to cancel login, or the user supplied the wrong password) then the callback will be called with NULL.

When the callback receives the signed assertion, it should send it to the server for verification.

Syntax

window.navigator.id.getVerifiedEmail(gotAssertion);

Parameters

gotAssertion
A callback function which will be called with a signed assertion object or NULL. The callback should send the assertion to the server for verification.

Example

Example needed.

Specification

Not included in any specification.

See also

Метки документа и участники

 Внесли вклад в эту страницу: teoli, MHasan, wbamberg, kscarfone, Sheppy, ethertank, Callahad
 Обновлялась последний раз: teoli,