passport-thingspace
v1.0.0-alpha.1
Published
A Passport Strategy for ThingSpace
Downloads
2
Maintainers
Readme
ThingSpace Passport Strategy
A Passport Strategy for ThingSpace.
Installation
To get started, you need to install this package via npm:
$ npm install passport-thingspace
Usage
To use this module, you first need to pass some environment variables -- these
will be used by the passport-thingspace
library to connect to the ThingSpace SDK:
You can then initialize the
passport-thingspace
strategy like so:
var passport = require('passport');
var ThingSpaceStrategy = require('passport-stormpath');
var config = { key: 'TS_KEY', secret: 'TS_SECRET', host: 'TS_HOST' };
var strategy = new ThingspaceStrategy(config);
passport.use('thingspace', strategy);
passport.serializeUser(strategy.serializeUser);
passport.deserializeUser(strategy.deserializeUser);
License
MIT © IRVUI