Skip to content

hyperonecom/h1-credentials-helper-js

Repository files navigation

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •