Skip to content

Validates a passed JWT token based on the RFC 7519 standard

License

Notifications You must be signed in to change notification settings

entwicklerstube/jwt-valid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JWT Valid

Pass a JWT token and get a boolean if the token is valid, the requirements for a valid token are defined by the official RFC 7519 standard

Zero Dependencies Coverage Status Build Status devDependencies Status

Install

npm

npm install jwt-valid

yarn

yarn add jwt-valid

Usage

jwtValid(JWT_TOKEN<STRING>)

Example

jwtValid('this is no valid token') // returns false
jwtValid('some.valid.token')   // returns true

Support

Browser Under the hood it uses the window.atob() native feature which is supported in each major browser and IE from version 10 (check mozilla dev site)

Node Uses the native Buffer API from node (check node documentation)

About

Validates a passed JWT token based on the RFC 7519 standard

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published