0.0.4 • Published 5 years ago

@articulate/hapi-authentic v0.0.4

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

hapi-authentic

@articulate/hapi-authentic Build Status

A hapi 16.x JWT/Bearer auth plugin using @articulate/authentic.

Use

const Authentic = require('@articulate/hapi-authentic')
server.register(Authentic, err => {
  if (err) throw err
  server.auth.strategy('bearer', 'authentic', { issWhitelist: ['https://iss'] })
  server.route({
    method: 'GET',
    path: '/test',
    config: {
      auth: 'bearer',
      handler: (request, reply) =>
        reply()
    }
  })
})