1.0.40 • Published 7 years ago

hapi-wso2-apim v1.0.40

Weekly downloads
2
License
BSD-3-Clause
Repository
-
Last release
7 years ago

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 :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

7 years ago

1.0.39

7 years ago

1.0.37

7 years ago

1.0.36

7 years ago

1.0.35

7 years ago

1.0.34

7 years ago

1.0.33

7 years ago

1.0.32

7 years ago

1.0.31

7 years ago

1.0.30

7 years ago

1.0.29

7 years ago

1.0.28

7 years ago

1.0.27

7 years ago

1.0.26

7 years ago

1.0.25

7 years ago

1.0.24

7 years ago

1.0.23

7 years ago

1.0.22

7 years ago

1.0.21

7 years ago

1.0.20

7 years ago

1.0.19

7 years ago

1.0.18

7 years ago

1.0.17

7 years ago

1.0.16

7 years ago

1.0.15

7 years ago

1.0.14

7 years ago

1.0.13

7 years ago

1.0.12

7 years ago

1.0.11

7 years ago

1.0.10

7 years ago

1.0.9

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago