@hyperone/credentials
TypeScript icon, indicating that this package has built-in type declarations

1.1.1 • Public • Published

H1-credentials-helper-js

Installation

This library can be installed using package manager such as npm, or yarn, or compiled (transpiled) from sources.

npm

npm i @hyperone/credentials

yarn

yarn add @hyperone/credentials

Compiling from sources

  1. Clone repository:

    git clone https://github.com/hyperonecom/h1-credentials-helper-js
  2. Continue to directory

    cd h1-credentials-helper-js
  3. Install dependencies

    Yarn is the preffered way of getting dependencies.

    yarn
  4. Build project

    yarn build

    Library output should be saved to dist directory.

Providers

Passport provider

Passport provider is based on passport file which can be generated using h1-cli.

Usage

import { getPassportCredentialsHelper } from "@hyperone/credentials";

const authProvider = getPassportCredentialsHelper();
const jwt = authProvider.getToken("https://api.hyperone.com/v2");

Environment Variables

  • HYPERONE_PASSPORT_FILE set passport file location

Readme

Keywords

none

Package Sidebar

Install

npm i @hyperone/credentials

Weekly Downloads

3

Version

1.1.1

License

MIT

Unpacked Size

8.78 kB

Total Files

24

Last publish

Collaborators

  • frederico.silva
  • adobrawy