https://github.com/articulate/hapi-authentic
https://github.com/articulate/hapi-authentic
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/articulate/hapi-authentic
- Owner: articulate
- Created: 2018-07-12T19:11:59.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2019-04-04T15:31:07.000Z (over 7 years ago)
- Last Synced: 2025-03-08T00:02:16.218Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 94.7 KB
- Stars: 0
- Watchers: 56
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# hapi-authentic
[](https://www.npmjs.com/package/@articulate/hapi-authentic)
[](https://travis-ci.org/articulate/hapi-authentic)
A hapi 16.x JWT/Bearer auth plugin using [@articulate/authentic](https://github.com/articulate/authentic).
## Use
```javascript
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()
}
})
})
```