hapi-wso2-apim
1.0.40 • Public • Published hapi-oauth2-access-token
This is a plugin for Hapijs server used to integrate OAuth2 Server.
Usage
- Run the command
npm install hapi-oauth2-access-token
use the flag --save
to add your package.json
file.
- Register plugin 😎
var HapiOAuth2AccessToken = require('hapi-oauth2-access-token')
server.register({
register: HapiOAuth2AccessToken,
options: {
host: 'your-host',
clientId: 'your-client-id',
clientSecret: 'your-client-secret',
protocol: 'http'
}
}
server.route({
method: 'GET',
path: '/',
config: {
auth: 'bearer',
handler: (request, reply) => {
reply('private resource')
}
}
})
Create with ❤️ by Yalo
Versions
Current Tags
- VersionDownloads (Last 7 Days)
- 1.0.40
1
Version History
Package Sidebar
Install
Weekly Downloads