0.0.8 • Published 10 years ago

passport-w3auth v0.0.8

Weekly downloads
1
License
ISC
Repository
github
Last release
10 years ago

W3 Authoritzation library

Used to authenticate using a w3 authorization API

Installation

npm install passport-w3auth --save

Enabling Group Authentication in Express 4

app.js

// import BlueAuth
var BlueAuth = require('passport-w3auth');
var myAuth = BlueAuth.buildAuth({
    api: 'group_api_url'
    admin: 'admin_group_name'
    superuser: 'superuser_group_name'
});

// add to express router
var router = express.Router();
router.use(myAuth);

Using Passport

app.js

// Include in your dependencies list
var passport = require('passport')
  , W3AuthStrategy = require('passport-w3auth').W3AuthStrategy;


var config = require(__dirname + '/conf/config')
var api = config.w3auth.url
passport.use(new W3AuthStrategy());

config/config.js

var config = {
    w3auth: {
    	       url: ${url}
    }
}

module.exports = {
    config: config
};

Using API

Under construction

0.0.8

10 years ago

0.0.7

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago