navigator.id.getVerifiedEmail

  • Revision slug: DOM/navigator.id.getVerifiedEmail
  • Revision title: navigator.id.getVerifiedEmail
  • Revision id: 293994
  • Created:
  • Creator: Callahad
  • Is current revision? No
  • Comment

Revision Content

 

{{ DomRef() }}

{{ non-standard_header() }}

{{ deprecated_header() }}

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

Revision Source

<p>&nbsp;</p>
<p>{{ DomRef() }}</p>
<p>{{ non-standard_header() }}</p>
<p>{{ deprecated_header() }}</p>
<div class="note">
  <strong>Note:</strong> This function has been deprecated in favor of <code><a rel="internal" href="https://developer-new.mozilla.org/en-US/docs/DOM/navigator.id.get">navigator.id.get()</a></code>, which has the same behavior, additional options, and a shorter name.</div>
<h3 id="Summary" name="Summary">Summary</h3>
<p>This function enables a web site to use <a href="/en/BrowserID" title="BrowserID">BrowserID</a> to authenticate its users. Call it in the click handler to your "log in with BrowserID" button with a callback function as a parameter.</p>
<p><code>navigator.id.getVerifiedEmail()</code> 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 <em>assertion</em> containing the user's email address, passing the assertion into the callback.</p>
<p>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 <code>NULL</code>.</p>
<p>When the callback receives the signed assertion, it should send it to the server for verification.</p>
<h3 id="Syntax" name="Syntax">Syntax</h3>
<pre class="brush: js">
window.navigator.id.getVerifiedEmail(gotAssertion);
</pre>
<h4 id="Parameters">Parameters</h4>
<dl>
  <dt>
    <code>gotAssertion</code></dt>
  <dd>
    A callback function which will be called with a signed assertion object or <code>NULL</code>. The callback should send the assertion to the server for verification.</dd>
</dl>
<h3 id="Example" name="Example">Example</h3>
<p>Example needed.</p>
<h3 id="Specification" name="Specification">Specification</h3>
<p>Not included in any specification.</p>
<h3 id="See_also">See also</h3>
<ul>
  <li><a href="/en/BrowserID" title="BrowserID">BrowserID</a></li>
  <li><code><a rel="internal" href="https://developer-new.mozilla.org/en-US/docs/DOM/navigator.id">navigator.id</a></code></li>
  <li><code><a rel="internal" href="https://developer-new.mozilla.org/en-US/docs/DOM/navigator.id.get">navigator.id.get()</a></code></li>
  <li><code><a rel="internal" href="https://developer-new.mozilla.org/en-US/docs/DOM/navigator.id.logout">navigator.id.logout()</a></code></li>
</ul>
Revert to this revision