@gluedigital/auth
Glue Auth ==================
Last updated 7 months ago by csar .
MIT · Original npm · Tarball · package.json
$ cnpm install @gluedigital/auth 
SYNC missed versions from official npm registry.

Glue Auth

Module that allows to manage all the authentication of an application including the sending of emails

Usage

router.use(['/auth/*'], endpoints.routes(), endpoints.allowedMethods())
router.use('/api/*', authorize)
router.get('/api/demo', (ctx, next) => { ctx.body = 'Hello, visitor!' })
router.get('/api/user/getMe', requireLoggedIn, (ctx, next) => { ctx.body = 'Hello, user ' + ctx.user.id })
router.get('/api/admin/demo', requireRole('ADMIN'), (ctx, next) => { ctx.body = 'Hello, admin ' + ctx.user.id })

Developing

To try your changes in @gluedigital/auth, clone this repo and use yarn link, then link it in the demo project with yarn link @gluedigital/auth. We also provide a "watch mode" to rebuild the bundle on change, which you can start with yarn watch.

Current Tags

  • 0.2.6                                ...           latest (7 months ago)

7 Versions

  • 0.2.6                                ...           7 months ago
  • 0.2.5                                ...           7 months ago
  • 0.2.4                                ...           9 months ago
  • 0.2.3                                ...           a year ago
  • 0.2.0                                ...           a year ago
  • 0.1.1                                ...           a year ago
  • 0.1.0                                ...           a year ago
Downloads
Today 0
This Week 7
This Month 7
Last Day 7
Last Week 14
Last Month 21
Dependencies (4)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |