@kevinwang0316/jwt-verify

1.0.2 • Public • Published

Verify JWT

A library to help parse a JSON web token.

Build Status Coverage Status

Dependencies requirement

Due to this library is a wrapper for jsonwebtonken, the jsonwebtonken package is required. Please check your package.json file.

  • jsonwebtonken

Installing

npm install --save @kevinwang0316/verify-jwt jsonwebtonken

Usage

import verifyJWT from '@kevinwang0316/verify-jwt';
// For NodeJS
// const verifyJWT = require(''@kevinwang0316/verify-jwt'');

// jwtInfo will be false if it fails the verification.
const jwtInfo = verifyJWT('jwtMessage', 'jwtSecret');

Log Configuration

The @kevinwang0316/log library is using

If you want to change the defual log level (debug):

Add a log_level variable to your .env file. Or if you are using Fass solution such as AWS Lambda, set up the log_level to your environment.

Log all level of information (debug, info, warn, error) log_level=DEBUG

Log info and above levels of information (info, warn, error) log_level=INFO

Log warn and above levels of information (warn, error) log_level=WARN

Log just error level of information (error) log_level=ERROR

License

Log is licensed under MIT License - see the License file.

Package Sidebar

Install

npm i @kevinwang0316/jwt-verify

Weekly Downloads

0

Version

1.0.2

License

MIT

Unpacked Size

4.65 kB

Total Files

4

Last publish

Collaborators

  • kevinwang0316