How to use the openid.AttributeExchange function in openid

To help you get started, we’ve selected a few openid examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github CodeArtemis / TriggerRally / server / node_modules / passport-google / node_modules / passport-openid / lib / passport-openid / strategy.js View on Github external
if (options.profile) {
    var sreg = new openid.SimpleRegistration({
      "fullname" : true,
      "nickname" : true, 
      "email" : true, 
      "dob" : true, 
      "gender" : true, 
      "postcode" : true,
      "country" : true, 
      "timezone" : true,
      "language" : true
    });
    extensions.push(sreg);
  }
  if (options.profile) {
    var ax = new openid.AttributeExchange({
      "http://axschema.org/namePerson" : "required",
      "http://axschema.org/namePerson/first": "required",
      "http://axschema.org/namePerson/last": "required",
      "http://axschema.org/contact/email": "required"
    });
    extensions.push(ax);
  }

  if (options.ui) {
    // ui: { mode: 'popup', icon: true, lang: 'fr-FR' }
    var ui = new openid.UserInterface(options.ui);
    extensions.push(ui);
  }

  if (options.pape) {
    var papeOptions = {};
github jaredhanson / passport-openid / lib / passport-openid / strategy.js View on Github external
if (options.profile) {
    var sreg = new openid.SimpleRegistration({
      "fullname" : true,
      "nickname" : true, 
      "email" : true, 
      "dob" : true, 
      "gender" : true, 
      "postcode" : true,
      "country" : true, 
      "timezone" : true,
      "language" : true
    });
    extensions.push(sreg);
  }
  if (options.profile) {
    var ax = new openid.AttributeExchange({
      "http://axschema.org/namePerson" : "required",
      "http://axschema.org/namePerson/first": "required",
      "http://axschema.org/namePerson/last": "required",
      "http://axschema.org/contact/email": "required"
    });
    extensions.push(ax);
  }

  if (options.ui) {
    // ui: { mode: 'popup', icon: true, lang: 'fr-FR' }
    var ui = new openid.UserInterface(options.ui);
    extensions.push(ui);
  }

  if (options.pape) {
    var papeOptions = {};
github bnoguchi / everyauth / lib / modules / openid.js View on Github external
.definit( function () {
    this.relyingParty = new oid.RelyingParty(this.myHostname() + this.callbackPath(), null, false, false, [
        new oid.UserInterface()
      , new oid.SimpleRegistration(this.simpleRegistration())
      , new oid.AttributeExchange(this.attributeExchange())
    ]);
  })
  .get('entryPath',
github ganarajpr / express-angular / node_modules / everyauth / lib / modules / openid.js View on Github external
.definit( function () {
    this.relyingParty = new oid.RelyingParty(this.myHostname() + this.callbackPath(), null, false, false, [
        new oid.UserInterface()
      , new oid.SimpleRegistration(this.simpleRegistration())
      , new oid.AttributeExchange(this.attributeExchange())
    ]);
  })
  .get('entryPath',
github webinos / Webinos-Platform / webinos / core / pzhweb / routes / peerPzhAuth.js View on Github external
module.exports = function (app, address, port) {
    var openid = require('openid');
    var dependency = require("find-dependencies")(__dirname),
        logger = dependency.global.require(dependency.global.util.location, "lib/logging.js")(__filename) || console,
        pzhAdaptor = require('../pzhadaptor.js'),
        helper = require('./helper.js');

    var attr = new openid.AttributeExchange({
        "http://axschema.org/contact/country/home":"required",
        "http://axschema.org/namePerson/first":"required",
        "http://axschema.org/pref/language":"required",
        "http://axschema.org/namePerson/last":"required",
        "http://axschema.org/contact/email":"required",
        "http://axschema.org/namePerson/friendly":"required",
        "http://axschema.org/namePerson":"required",
        "http://axschema.org/media/image/default":"required",
        "http://axschema.org/person/gender/":"required"
    });

    app.get('/main/:useremail/request-access-login', function (req, res) {
        //Args: External user's PZH URL
        //Args: External user's PZH certificate
        //Auth: Check that the certificate is valid and that the certificate is valid for this URL.
        //UI: Presents a button that the user must click to confirm the request
github webinos / Webinos-Platform / webinos / pzh / web / pzh_openid.js View on Github external
exports.authenticate = function(hostname, url, res, query) {
  var exts= [];
  var attr = new openid.AttributeExchange({
    "http://axschema.org/contact/country/home":     "required",
    "http://axschema.org/namePerson/first":         "required",
    "http://axschema.org/pref/language":            "required",
    "http://axschema.org/namePerson/last":          "required",
    "http://axschema.org/contact/email":            "required",
    "http://axschema.org/namePerson/friendly":      "required",
    "http://axschema.org/namePerson":               "required",
    "http://axschema.org/media/image/default":      "required",
    "http://axschema.org/person/gender/":           "required"
  });
  exts.push(attr);
  rely = new openid.RelyingParty('https://'+hostname+':'+
      session.configuration.port.farm_webServerPort+'/main.html?cmd=verify&id='+query.id,
    null,
    false,
    false,
github G33kLabs / Node.VaSH / libs / server / passports / passport-openid / strategy.js View on Github external
if (options.profile) {
    var sreg = new openid.SimpleRegistration({
      "fullname" : true,
      "nickname" : true, 
      "email" : true, 
      "dob" : true, 
      "gender" : true, 
      "postcode" : true,
      "country" : true, 
      "timezone" : true,
      "language" : true
    });
    extensions.push(sreg);
  }
  if (options.profile) {
    var ax = new openid.AttributeExchange({
      "http://axschema.org/namePerson/first": "required",
      "http://axschema.org/namePerson/friendly": "required",
      "http://axschema.org/namePerson/last": "required",
      "http://axschema.org/contact/email": "required",
      "http://axschema.org/person/gender": "required",
      "http://openid.net/schema/person/guid": "required"
    });
    extensions.push(ax);
  }
  
  this._relyingParty = new openid.RelyingParty(
    options.returnURL,
    options.realm,
    (options.stateless === undefined) ? false : options.stateless,
    (options.secure === undefined) ? true : options.secure,
    extensions);