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.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.1.06latest

Version History

VersionDownloads (Last 7 Days)Published
0.1.06

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