physio-authentication

0.0.12 • Public • Published

physio-authentication

General authentication module for all Physio services

Instalation

# Include the library
var Auth = require('physio-authentication')

# Init the module
var auth = new Auth({
  env: config.get('NODE_ENV'),
  baseUrl: 'localhost:3002',
  failUrl: 'http://localhost:3002/login',
  successUrl: 'http://localhost:3002/'
})

# Use as a expressjs middleware
auth.expressify(app, express);

Usage

router.get('/some/path', function (req, res, next) {
  // useage
  console.log(req.currentUser);
})

Readme

Keywords

none

Package Sidebar

Install

npm i physio-authentication

Weekly Downloads

2

Version

0.0.12

License

none

Last publish

Collaborators

  • physio
  • spekulatif