byu-hydra-request
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

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 
  })
}

Readme

Keywords

none

Package Sidebar

Install

npm i byu-hydra-request

Weekly Downloads

0

Version

1.0.0

License

Apache-2.0

Unpacked Size

52.4 kB

Total Files

18

Last publish

Collaborators

  • brogerm