1.0.0 • Published 5 years ago

byu-hydra-request v1.0.0

Weekly downloads
4
License
Apache-2.0
Repository
github
Last release
5 years ago

byu-hydra-request

Utility for making a server to server request using hydra authentication

Installation

$ npm install byu-hydra-request

Usage

const byuHydraRequest = require('byu-hydra-request')

async function foo() {
  // configure the hydra oauth settings (only need to do on startup)
  await byuHydraRequest.setOauthSettings('client_key', 'client_secret', 'well_known_url')
  
  // make the request
  return await byuHydraRequest.request({
    url: 'hydra_endpoint_here',
    someProperty: true 
  })
}