Skip to content

jwt 0.0.1-beta.0

Install from the command line:
Learn more about npm packages
$ npm install @byu-oit/jwt@0.0.1-beta.0
Install via package.json:
"@byu-oit/jwt": "0.0.1-beta.0"

About this version

@byu-oit/jwt

Provides helpful functions to retrieve a specified BYU .well-known URL and verify BYU signed JWTs.

Usage

import {ByuJwt} from '@byu-oit/jwt'

const byuJwt = new ByuJwt({ issuer: 'https://api.byu.edu' })

const jwt = byuJwt.verify('[your jwt]')

Options

property type default description
basePath string undefined will validate that the audience starts with the provided basePath in production.
cacheDuration number 60 * 60 (1 hour) the default cache duration in seconds if one isn't provided by the max-age header for the certs or openid configuration
development boolean false skips JWT verification for development purposes but will throw an error if NODE_ENV is set to production
issuer string undefined The OAuth Provider host, e.g. https://api.byu.edu. Either the issuer or the openIdConfigUrl are required but not both.
openIdConfigUrl string undefined Can specify the openIdConfigUrl explicitly if your open id configuration is not located at /.well-known/openid-configuration. Overwrites issuer when fetching the OpenID configuration. Either the issuer or the openIdConfigUrl are required but not both.

The JWT Payload contains

Details

  • jwt
  • @byu-oit byu-oit
  • over 2 years ago
  • Apache-2.0
  • 17 dependencies

Assets

  • jwt-0.0.1-beta.0.tgz

Download activity

  • Total downloads 0
  • Last 30 days 0
  • Last week 0
  • Today 0