Socket
Book a DemoInstallSign in
Socket

jot

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jot

hapi JSON Web Token (JWT) authentication plugin

Source
npmnpm
Version
1.1.0
Version published
Weekly downloads
4
-73.33%
Maintainers
1
Weekly downloads
 
Created
Source

jot

hapi JSON Web Token (JWT) authentication plugin

Build Status Coverage Status

The 'jwt' scheme takes the following options:

  • secret - (required) {string} secret key used to compute the signature.
  • algorithms - (optional) {array} algorithm(s) allowed to verify tokens. Defaults to ['HS256']. Valid algorithms: ['HS256', 'HS384', 'HS512', 'RS256', 'RS384', 'RS512', 'ES256', 'ES384', 'ES512', 'none']
  • audience - (optional) {string|integer} verify audience (aud) claim against this value
  • cookie - (optional) {string} cookie name. Defaults to sid. Works in tandem with hapi-auth-cookie. Must set JWT when the cookie is set. See examples below.
  • issuer - (optional) {string|integer} verify issuer (iss) claim against this value
  • token - (optional) {string} name of the token set in the cookie. Defaults to token.
  • validateFunc - (optional) {function} function to validate the decoded token on every request.

Note: Storing the JWT in a cookie is optional. You can always send the JWT in an Authorization header.

For examples of usage, check out the tests.

Keywords

jot

FAQs

Package last updated on 20 Dec 2015

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