@rhcp/sso-node-client

0.1.3 • Public • Published

Red Hat SSO NodeJS Client

Simple client for getting SSO access token to use with API's such as GraphQL

Getting started

import SSOClient from "@rhcp/sso-node-client";

const client = new SSOClient({
    url: process.env.URL,
    realm: process.env.REALM,
    scopes: [process.env.SCOPE],
    clientId: process.env.CLIENT_ID,
    clientSecret: process.env.CLIENT_SECRET,
  });

const token = await client.refreshToken();

// Use token to in Authorization header to GraphQL

Readme

Keywords

none

Package Sidebar

Install

npm i @rhcp/sso-node-client

Weekly Downloads

52

Version

0.1.3

License

MIT

Unpacked Size

4.18 kB

Total Files

4

Last publish

Collaborators

  • bexter89
  • dfaucette
  • rlahoda
  • cgatyas
  • caramelcode
  • mwcz
  • kylebuch8