New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

funky-jwt

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

funky-jwt

Native JWT validation without deps

latest
Source
npmnpm
Version
1.1.1
Version published
Maintainers
1
Created
Source

Native JWT validation

Using nothing but what modern browsers provide, this package can decode and validate JWT, even those signed using RS256.

Supported Algorithms

  • HS256
  • HS384
  • HS512
  • RS256
  • RS384
  • RS512

Note: RS algorithms only support keys in JWK format, currently.

Usage

let jwt = new JWT(token, options);
try {
    jwt.is_valid()
} catch {
    // :(
};

Options

  • hostname : used to retrieve public JWK from well known URI.
  • secret : Base64Url encoded secret for HS algorithms.
  • keys: known JWK objects for RS algorithms.
  • alg : specify to restrict acceptable algorithm.
  • aud : specify to validate the audience claim.

FAQs

Package last updated on 14 Apr 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts