Foundry.ai API auth middleware


stars 🌟issues ⚠️updated 🛠created 🐣size 🏋️‍♀️
10Sep 21, 2018Aug 28, 2017Minified + gzip package size for @foundry-ai/api-auth in KB


Foundry.ai Api Auth

This module exposes connect middleware for Foundry.ai APIs to authenticate requests.

npm install --save @foundry-ai/api-auth

Basic Usage

const apiAuth = require('@foundry-ai/api-auth');
const app = require('express');

  authEndpoint: 'https://auth.myapp.com/v1/oauth2/authorization'

Access Data

If authorization is successful any data returned from your auth endpoint will be attached to the request and made available via req.auth

  authEndpoint: 'https://auth.myapp.com/v1/oauth2/authorization'

app.get('/test', (req, res, next) => {
  // { 
  //   userId: 'dfce809c-9245-551d-9312-ed3551e6bebb', 
  //   scope: '*' 
  // }

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.