byu-oit / byu-jwt-nodejs Goto Github PK
View Code? Open in Web Editor NEWThis package provides helpful functions for validating and using BYU's JWTs.
License: Apache License 2.0
This package provides helpful functions for validating and using BYU's JWTs.
License: Apache License 2.0
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.
Link, please. ๐
Originally posted by @GaryGSC in #89 (comment)
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.
Looks like pem
, one of the dependencies, needs openssl.
Possible solution:
https://www.npmjs.com/package/pem#setting-openssl-location
Edit: String that worked: C:\OpenSSL-Win32\bin\openssl
(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))
Can this be changed/modified to respect/utilize the cache-control headers for both the openid-configuration as well as the byucerts?
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?
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)
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:
Originally posted by @GaryGSC in #89 (comment)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.