1.0.0 • Published 12 years ago

browserid-service-verify v1.0.0

Weekly downloads
5
License
-
Repository
github
Last release
12 years ago

This library makes deploying BrowserID easy in node.js projects.

Plain standalone browserid verifier will be better method to implement BrowserID, but a stable one wasn't available when I wrote this library.

The example should be clear enough, but API is so simple that I will describe it.

var browserid_verify = require('browserid-service-verify');

var on_login = function (assertion, logged_in) {
    browserid_verify(
        {"assertion": assertion, "audience": "http://example.org"},
        function (verification) {
            logged_in(verification.status == "okay", verification);
        }
    );
};

api

browserid_verify(options, callback)

options should contain two parameters:

  • assertion the encoded assertion from client
  • audience the hostname and optional port of your site. The client-side MUST NOT be allowed fill this, for security reasons.

The verification will be returned by the callback. It is an ordinary browserid verification.