1.0.40 • Published 8 years ago
hapi-wso2-apim v1.0.40
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 yourpackage.json
file. - Register plugin :sunglasses:
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' // optional, default is http
}
}
- Set auth to your routes:
server.route({
method: 'GET',
path: '/',
config: {
auth: 'bearer',
handler: (request, reply) => {
reply('private resource')
}
}
})
- Enjoy the magic :tada:
Create with :heart: by Yalo
1.0.40
8 years ago
1.0.39
8 years ago
1.0.37
8 years ago
1.0.36
8 years ago
1.0.35
8 years ago
1.0.34
8 years ago
1.0.33
8 years ago
1.0.32
8 years ago
1.0.31
8 years ago
1.0.30
8 years ago
1.0.29
8 years ago
1.0.28
8 years ago
1.0.27
8 years ago
1.0.26
8 years ago
1.0.25
8 years ago
1.0.24
8 years ago
1.0.23
8 years ago
1.0.22
8 years ago
1.0.21
8 years ago
1.0.20
8 years ago
1.0.19
8 years ago
1.0.18
8 years ago
1.0.17
8 years ago
1.0.16
8 years ago
1.0.15
8 years ago
1.0.14
8 years ago
1.0.13
8 years ago
1.0.12
8 years ago
1.0.11
8 years ago
1.0.10
8 years ago
1.0.9
8 years ago
1.0.8
8 years ago
1.0.7
8 years ago
1.0.6
8 years ago
1.0.5
8 years ago