@onehilltech/gatekeeper

Authentication framework for Web application programming interfaces (APIs)

this package has been deprecated
Last updated 3 years ago by onehilltech .
Apache-2.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @onehilltech/gatekeeper 
SYNC missed versions from official npm registry.

Gatekeeper

OAuth 2.0 token server and module for Blueprint.js

npm version Build Status Dependencies Coverage Status

Installation

npm install @onehilltech/gatekeeper --save

Getting Started

Initial setup

First, run the setup script from the project directory:

./bin/gatekeeper-setup

This will register the gatekeeper-cli client, and other clients, with the server. The client registrations will be placed in ./gatekeeper under the project directory.

Defining the configuration

Define the configuration file gatekeeper.config.js to configure the module for your application:

module.exports = {
  token: {
    kind: 'jwt',
    options: {
      issuer: 'name-of-the-application',
      algorithm : 'RS256',
      secret: 'ssshhh'   // can replace with publicKey, privateKey properties
    }
  }
};

Defining Gatekeeper router endpoint

Define a route (or router) to import the Gatekeeper routes into the application:

// app/routers/EndpointRouter.js
const blueprint = require ('@onehilltech/blueprint')
  ;

module.exports = exports = {
  '/gatekeeper': blueprint ('router://@onehilltech/gatekeeper:v1')
};

Protecting routes

The router definition above will expose the Gatekeeper routers at /gatekeeper. Lastly, define the routes you want to protect using the gatekeeper.auth.bearer Blueprint policy. For example, you can protect all routes on a given path:

// EndpointRouters.js

module.exports = {
  '/v1': {
    policy: 'gatekeeper.auth.bearer'
  }
};

The router above will protect all routes under the /v1 path, which includes all routers located in app/routers/v1 directory. The client will need to define the Authorization header and include a generated token.

Next Steps

See the Wiki for more information.

Current Tags

  • 0.66.11                                ...           latest (3 years ago)

173 Versions

  • 0.66.11 [deprecated]           ...           3 years ago
  • 0.66.9 [deprecated]           ...           3 years ago
  • 0.66.8 [deprecated]           ...           3 years ago
  • 0.66.7 [deprecated]           ...           3 years ago
  • 0.66.6 [deprecated]           ...           3 years ago
  • 0.66.5 [deprecated]           ...           3 years ago
  • 0.66.4 [deprecated]           ...           3 years ago
  • 0.66.3 [deprecated]           ...           3 years ago
  • 0.66.2 [deprecated]           ...           3 years ago
  • 0.66.1 [deprecated]           ...           3 years ago
  • 0.66.0 [deprecated]           ...           3 years ago
  • 0.65.0 [deprecated]           ...           3 years ago
  • 0.64.8 [deprecated]           ...           3 years ago
  • 0.64.7 [deprecated]           ...           3 years ago
  • 0.64.6 [deprecated]           ...           3 years ago
  • 0.64.5 [deprecated]           ...           3 years ago
  • 0.64.4 [deprecated]           ...           3 years ago
  • 0.64.3 [deprecated]           ...           3 years ago
  • 0.64.2 [deprecated]           ...           3 years ago
  • 0.64.1 [deprecated]           ...           3 years ago
  • 0.64.0 [deprecated]           ...           3 years ago
  • 0.63.0 [deprecated]           ...           3 years ago
  • 0.62.0 [deprecated]           ...           3 years ago
  • 0.61.1 [deprecated]           ...           3 years ago
  • 0.61.0 [deprecated]           ...           3 years ago
  • 0.60.0 [deprecated]           ...           3 years ago
  • 0.59.5 [deprecated]           ...           3 years ago
  • 0.59.4 [deprecated]           ...           3 years ago
  • 0.59.3 [deprecated]           ...           3 years ago
  • 0.59.2 [deprecated]           ...           3 years ago
  • 0.59.1 [deprecated]           ...           3 years ago
  • 0.59.0 [deprecated]           ...           3 years ago
  • 0.58.2 [deprecated]           ...           3 years ago
  • 0.58.1 [deprecated]           ...           3 years ago
  • 0.58.0 [deprecated]           ...           3 years ago
  • 0.57.5 [deprecated]           ...           3 years ago
  • 0.57.4 [deprecated]           ...           3 years ago
  • 0.57.3 [deprecated]           ...           3 years ago
  • 0.57.2 [deprecated]           ...           3 years ago
  • 0.57.1 [deprecated]           ...           3 years ago
  • 0.57.0 [deprecated]           ...           3 years ago
  • 0.56.3 [deprecated]           ...           3 years ago
  • 0.56.2 [deprecated]           ...           3 years ago
  • 0.56.1 [deprecated]           ...           3 years ago
  • 0.56.0 [deprecated]           ...           3 years ago
  • 0.55.1 [deprecated]           ...           3 years ago
  • 0.55.0 [deprecated]           ...           3 years ago
  • 0.54.4 [deprecated]           ...           3 years ago
  • 0.54.3 [deprecated]           ...           3 years ago
  • 0.54.2 [deprecated]           ...           3 years ago
  • 0.54.1 [deprecated]           ...           3 years ago
  • 0.54.0 [deprecated]           ...           3 years ago
  • 0.53.0 [deprecated]           ...           3 years ago
  • 0.52.0 [deprecated]           ...           3 years ago
  • 0.51.3 [deprecated]           ...           3 years ago
  • 0.51.2 [deprecated]           ...           3 years ago
  • 0.51.1 [deprecated]           ...           3 years ago
  • 0.50.9 [deprecated]           ...           3 years ago
  • 0.50.8 [deprecated]           ...           3 years ago
  • 0.50.7 [deprecated]           ...           3 years ago
  • 0.50.5 [deprecated]           ...           3 years ago
  • 0.50.4 [deprecated]           ...           3 years ago
  • 0.50.3 [deprecated]           ...           3 years ago
  • 0.50.2 [deprecated]           ...           3 years ago
  • 0.50.1 [deprecated]           ...           3 years ago
  • 0.50.0 [deprecated]           ...           3 years ago
  • 0.49.1 [deprecated]           ...           3 years ago
  • 0.49.0 [deprecated]           ...           3 years ago
  • 0.48.2 [deprecated]           ...           3 years ago
  • 0.48.1 [deprecated]           ...           3 years ago
  • 0.48.0 [deprecated]           ...           3 years ago
  • 0.47.0 [deprecated]           ...           3 years ago
  • 0.46.1 [deprecated]           ...           3 years ago
  • 0.46.0 [deprecated]           ...           3 years ago
  • 0.45.2 [deprecated]           ...           4 years ago
  • 0.45.1 [deprecated]           ...           4 years ago
  • 0.45.0 [deprecated]           ...           4 years ago
  • 0.44.0 [deprecated]           ...           4 years ago
  • 0.43.0 [deprecated]           ...           4 years ago
  • 0.42.0 [deprecated]           ...           4 years ago
  • 0.41.0 [deprecated]           ...           4 years ago
  • 0.40.2 [deprecated]           ...           4 years ago
  • 0.40.1 [deprecated]           ...           4 years ago
  • 0.40.0 [deprecated]           ...           4 years ago
  • 0.39.1 [deprecated]           ...           4 years ago
  • 0.39.0 [deprecated]           ...           4 years ago
  • 0.38.1 [deprecated]           ...           4 years ago
  • 0.38.0 [deprecated]           ...           4 years ago
  • 0.37.0 [deprecated]           ...           4 years ago
  • 0.36.1 [deprecated]           ...           4 years ago
  • 0.36.0 [deprecated]           ...           4 years ago
  • 0.35.0 [deprecated]           ...           4 years ago
  • 0.34.1 [deprecated]           ...           4 years ago
  • 0.34.0 [deprecated]           ...           4 years ago
  • 0.33.0 [deprecated]           ...           4 years ago
  • 0.32.0 [deprecated]           ...           4 years ago
  • 0.31.1 [deprecated]           ...           4 years ago
  • 0.31.0 [deprecated]           ...           4 years ago
  • 0.30.3 [deprecated]           ...           4 years ago
  • 0.30.2 [deprecated]           ...           4 years ago
  • 0.30.1 [deprecated]           ...           4 years ago
  • 0.30.0 [deprecated]           ...           4 years ago
  • 0.29.2 [deprecated]           ...           4 years ago
  • 0.29.1 [deprecated]           ...           4 years ago
  • 0.29.0 [deprecated]           ...           4 years ago
  • 0.28.10 [deprecated]           ...           4 years ago
  • 0.28.9 [deprecated]           ...           4 years ago
  • 0.28.8 [deprecated]           ...           4 years ago
  • 0.28.7 [deprecated]           ...           4 years ago
  • 0.28.6 [deprecated]           ...           4 years ago
  • 0.28.5 [deprecated]           ...           4 years ago
  • 0.28.4 [deprecated]           ...           4 years ago
  • 0.28.3 [deprecated]           ...           4 years ago
  • 0.28.2 [deprecated]           ...           4 years ago
  • 0.28.1 [deprecated]           ...           4 years ago
  • 0.28.0 [deprecated]           ...           4 years ago
  • 0.27.4 [deprecated]           ...           4 years ago
  • 0.27.3 [deprecated]           ...           4 years ago
  • 0.27.2 [deprecated]           ...           4 years ago
  • 0.27.1 [deprecated]           ...           4 years ago
  • 0.27.0 [deprecated]           ...           4 years ago
  • 0.26.2 [deprecated]           ...           4 years ago
  • 0.26.1 [deprecated]           ...           4 years ago
  • 0.26.0 [deprecated]           ...           4 years ago
  • 0.25.1 [deprecated]           ...           4 years ago
  • 0.25.0 [deprecated]           ...           4 years ago
  • 0.24.6 [deprecated]           ...           4 years ago
  • 0.24.4 [deprecated]           ...           4 years ago
  • 0.24.3 [deprecated]           ...           4 years ago
  • 0.24.2 [deprecated]           ...           4 years ago
  • 0.24.1 [deprecated]           ...           4 years ago
  • 0.24.0 [deprecated]           ...           4 years ago
  • 0.23.2 [deprecated]           ...           4 years ago
  • 0.23.1 [deprecated]           ...           4 years ago
  • 0.23.0 [deprecated]           ...           4 years ago
  • 0.22.3 [deprecated]           ...           4 years ago
  • 0.22.2 [deprecated]           ...           4 years ago
  • 0.22.1 [deprecated]           ...           4 years ago
  • 0.22.0 [deprecated]           ...           4 years ago
  • 0.21.7 [deprecated]           ...           4 years ago
  • 0.21.6 [deprecated]           ...           4 years ago
  • 0.21.5 [deprecated]           ...           4 years ago
  • 0.21.4 [deprecated]           ...           4 years ago
  • 0.21.3 [deprecated]           ...           4 years ago
  • 0.21.2 [deprecated]           ...           4 years ago
  • 0.21.1 [deprecated]           ...           4 years ago
  • 0.21.0 [deprecated]           ...           4 years ago
  • 0.20.3 [deprecated]           ...           4 years ago
  • 0.20.2 [deprecated]           ...           4 years ago
  • 0.20.1 [deprecated]           ...           4 years ago
  • 0.20.0 [deprecated]           ...           4 years ago
  • 0.19.0 [deprecated]           ...           4 years ago
  • 0.18.0 [deprecated]           ...           4 years ago
  • 0.17.1 [deprecated]           ...           4 years ago
  • 0.17.0 [deprecated]           ...           4 years ago
  • 0.16.2 [deprecated]           ...           4 years ago
  • 0.16.1 [deprecated]           ...           4 years ago
  • 0.16.0 [deprecated]           ...           4 years ago
  • 0.15.0 [deprecated]           ...           4 years ago
  • 0.14.0 [deprecated]           ...           4 years ago
  • 0.13.0 [deprecated]           ...           4 years ago
  • 0.12.5 [deprecated]           ...           5 years ago
  • 0.12.4 [deprecated]           ...           5 years ago
  • 0.12.3 [deprecated]           ...           5 years ago
  • 0.12.2 [deprecated]           ...           5 years ago
  • 0.12.1 [deprecated]           ...           5 years ago
  • 0.12.0 [deprecated]           ...           5 years ago
  • 0.11.3 [deprecated]           ...           5 years ago
  • 0.11.1 [deprecated]           ...           5 years ago
  • 0.11.0 [deprecated]           ...           5 years ago
  • 0.10.3 [deprecated]           ...           5 years ago
  • 0.10.2 [deprecated]           ...           5 years ago
  • 0.10.1 [deprecated]           ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 0
Dependencies (19)
Dev Dependencies (8)

Copyright 2014 - 2016 © taobao.org |