Skip to content

fastify-jwt 0.1.6

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

About this version

@byu-oit/fastify-jwt

Provides a fastify plugin for verifying JWTs at BYU OIT

Usage

import Fastify from 'fastify'
import { ByuLogger } from '@byu-oit/logger'
import { ByuJwtProvider } from '@byu-oit/fastify-jwt'

const logger = ByuLogger()
const fastify = Fastify({ logger })

fastify.register(ByuJwtProvider, {
  /** Only authenticate routes matching this prefix */
  prefix: '/example/v1',
  /** May pass in ByuJwt options from @byu-oit/jwt */
  development: process.env.NODE_ENV === 'development'
})

await fastify.listen({ port: 3000 }).catch(console.error)

Details


Assets

  • fastify-jwt-0.1.6.tgz

Download activity

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