0.2.6 • Published 5 years ago

@gluedigital/auth v0.2.6

Weekly downloads
7
License
MIT
Repository
-
Last release
5 years ago

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.

0.2.6

5 years ago

0.2.5

5 years ago

0.2.4

5 years ago

0.2.3

5 years ago

0.2.0

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago