infofabric-node-common

0.1.0 • Public • Published

infofabric-node-common

A small library that gives the following common functionalities

  • jwtUtils

Installation

npm install @infofabric/node-common

Usage

  • jwtUtils :

    const { jwtUtil } = require('@infofabric/node-common');
    
    // sample payload
    let payload = {
                userId : 'your-user-id', 
                buId : 'your-bu-id',
                roles : 'your-roles'
                }
    // let accessToken = jwtUtil.createJwtWithUser('your-user-id','your-bu-id');
    let accessToken = jwtUtil.createJwt(payload);
    

    Output should be your access-token


Tests

npm test

Contributing

In lieu of a formal style guide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code.

Readme

Keywords

Package Sidebar

Install

npm i infofabric-node-common

Weekly Downloads

6

Version

0.1.0

License

ISC

Unpacked Size

3.87 kB

Total Files

5

Last publish

Collaborators

  • suraj7986