Coder Social home page Coder Social logo

byu-oit / byu-jwt-nodejs Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 657 KB

This package provides helpful functions for validating and using BYU's JWTs.

License: Apache License 2.0

JavaScript 1.72% Shell 0.22% TypeScript 98.06%
auth fastify-jwt jwt

byu-jwt-nodejs's People

Contributors

alexkolson avatar arasmus8 avatar dependabot-preview[bot] avatar dependabot[bot] avatar garygsc avatar gi60s avatar jlast35 avatar joshgubler avatar martingarn avatar mhailstone avatar ndpete avatar rhettjay avatar stuft2 avatar tylerablackham avatar yoshutch avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

byu-jwt-nodejs's Issues

Delete master branch at end of 2021

We've switched to the main branch for all future development.

To give people time to switch (in case they're installing directly from the master branch on GitHub), we'll leave master around until the end of 2021.

Instantiation prevents graceful shutdown.

When setting up a new Express server, simply instantiating the ByuJWT library prevents the server from terminating gracefully when using Ctrl+C; stopping the server has to be done forcefully. This is the code I'm using (we are using imports in our project):

import ByuJWT from 'byu-jwt'

const byuJwt = ByuJWT({ development: process.env.NODE_ENV === 'development' })

Even if I use require rather than import, the result is the same. You'll also notice I'm not registering any middleware; I'm only creating the byuJwt object.

The desired outcome is that this doesn't stop the server from shutting down gracefully. Currently, I am still investigating workarounds. I will comment again if I find one.

authenticateUAPIMiddleware Example

(Just adding this as an issue so that students are aware of the easy fix.)

The authenticateUAPIMiddleware example doesn't work as given.

const express = require('express')
const byuJwt = require('byu-jwt')()

const app = express()

app.use(byuJwt.authenticateUAPIMiddleware)

const listener = app.listen(3000, err => {
    if (err) {
        console.error(err.stack)
    } else {
        console.log('Server listening on port ' + listener.address().port)
    }
})

Since express runs middleware functions in strict mode, this is undefined unless you do something like this to use the middleware:

app.use(byuJwt.authenticateUAPIMiddleware.bind(byuJwt))

Cache-control Headers

Can this be changed/modified to respect/utilize the cache-control headers for both the openid-configuration as well as the byucerts?

X-JWT-ASSERTION not provided by WSO2

The header key constant BYU_JWT_HEADER_CURRENT is not being provided by WSO2. Shouldn't we set the constant to what is actually being provided, and then change it once WSO2 is updated?

Enforce git commit conventions

          I believe we can [have GitHub help us](https://docs.github.com/en/enterprise-cloud@latest/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/available-rules-for-rulesets#metadata-restrictions) enforce conventional commits nowadays.

Originally posted by @GaryGSC in #89 (comment)

Rename publish jobs to improve clarity / Add a job GitHub pages docs

          We should clean up some of the naming to make it obvious at first glance that this is publishing docs to GitHub Pages. It might also be worth making this a separate job that runs in parallel as part of the other publishing workflow.

The idea would be to have the following jobs:

  • Publish / Docs on GitHub Pages
  • Publish / GitHub release
  • Publish / GitHub package
  • Publish / npm package

Originally posted by @GaryGSC in #89 (comment)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.