1.0.13 • Published 4 months ago

liquid-node-connector v1.0.13

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

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.
1.0.9

4 months ago

1.0.8

4 months ago

1.0.11

4 months ago

1.0.10

4 months ago

1.0.13

4 months ago

1.0.12

4 months ago

1.0.7

5 months ago

1.0.6

5 months ago

1.0.5

9 months ago

1.0.4

9 months ago

1.0.3

9 months ago

1.0.2

12 months ago

0.0.1

12 months ago

1.0.1

12 months ago

1.0.0

12 months ago