indaba-auth

0.0.1 • Public • Published

Indaba Auth

 
var authenticate = require('indaba-auth')({
  lydianEndpoint: 'zzz',
  clientId: 'xxx',
  clientSecret: 'yyy'
});
 
authenticate({
  username: 'username',
  password: 'password',
  grant_type: 'password'
}, function(err, token) {
  // do something with token
})
 
// middleware
var app = express();
app.use('/login', authenticate.middleware);
 

Middleware

When using the middleware, POST to /login with:

  • username and password for normal auth
  • facebook_token for Facebook auth

Tests

Ensure that these environment variables are set (add exports to your bashrc):

INDABA_TEST_ENDPOINT='https://lydian.indavelopment.com'
INDABA_TEST_CLIENT=''
INDABA_TEST_SECRET=''
INDABA_TEST_USERNAME=''
INDABA_TEST_PASSWORD=''
npm test

Readme

Keywords

none

Package Sidebar

Install

npm i indaba-auth

Weekly Downloads

1

Version

0.0.1

License

BSD

Last publish

Collaborators

  • stereosteve