This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

liquid-node-connector
TypeScript icon, indicating that this package has built-in type declarations

1.0.13 • Public • Published

Liquid Node Connector

A Node.js connector library to integrate your microservices with Liquid authentication services. This library requires Node version 18 or above.

Installation

Run npm i liquid-node-connector.

Usage

Initialization

import LiquidConnector from "liquid-node-connector";

const liquidConnector = new LiquidConnector({
  host: "host_address_of_your_liquid_instance",
  clientId: "your_liquid_client_id",
  clientSecret: "your_liquid_client_secret",
  scope: "scope1,scope2,scope3",
  // Optional
  cacheOptions: {
    client: RedisClient,
    expire: 300, // 5 minutes
  },
  // Optional
  logger: console, // Or any other logger that has debug, info, warn and error functions.
});

Authenticate a user connecting to your microservice

const user = await liquidConnector.authenticate(token);
// Now use this user info for the rest of your logic.

Get access token for accessing client level APIs

const { accessToken } = await liquidConnector.getAccessToken();
// Make APIs calls that requires client authentication.

Readme

Keywords

none

Package Sidebar

Install

npm i liquid-node-connector

Weekly Downloads

0

Version

1.0.13

License

MIT

Unpacked Size

7.88 kB

Total Files

6

Last publish

Collaborators

  • shrihariprakash