Security News
Research
Supply Chain Attack on Rspack npm Packages Injects Cryptojacking Malware
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
The byu-jwt module provides helpful functions to retrieve a specified BYU .well-known URL and verify BYU signed JWTs.
The byu-jwt module provides helpful functions to retrieve a specified BYU .well-known URL and verify BYU signed JWTs.
A property that can be set to enable or disable caching of the responses from well known URLs.
Defaults to false
.
Example
The example will set the module to cache well known URL responses:
const byuJwt = require('byu-jwt');
byuJwt.cacheWellknowns = true;
Get the response of the specified .well-known URL. If cacheWellKnowns is set to true
then it returns the previously retrieved response.
Parameters
Returns a promise that resolves to an object. The object is the parsed JSON response from the well known URL.
Example
const byuJwt = require('byu-jwt');
byuJwt.getWellKnown('http://the-wellknown-url.com')
.then(function(wellKnownObject) {
console.log('Response:', wellKnownObject);
});
Get the PEM formatted X509 certificate.
Parameters
Returns a promise that resolves a string.
Example
const byuJwt = require('byu-jwt');
byuJwt.getPublicKey('http://the-wellknown-url.com')
.then(function(publicKey) {
console.log('Response:', publicKey);
});
Verify and decode the signed JWT.
Parameters
Returns a promise that resolves an object.
Verifies and decodes the signed JWT and then formats it to provide easier access to important properties within the JWT.
Parameters
Returns a promise that resolves to an object. The object will have many properties, but the most relevant will have the following structure:
{
byu: {
client: {
byuId: string,
claimSource: string,
netId: string,
personId: string,
preferredFirstName: string,
prefix: string,
restOfName: string,
sortName: string,
subscriberNetId: string,
suffix: string,
surname: string,
surnamePosition: string
},
resourceOwner: { // only set if resource owner exists
byuId: string,
personId: string,
preferredFirstName: string,
prefix: string,
restOfName: string,
sortName: string,
suffix: string,
surname: string,
surnamePosition: string
},
webresCheck: {
byuId: string,
netId: string,
personId: string,
}
},
wso2: {
apiContext: string,
application: {
id: string,
name: string,
tier: string
},
clientId: string,
endUser: string,
endUserTenantId: string,
keyType: string,
subscriber: string,
tier: string,
userType: string,
version: string
}
}
Example
const byuJwt = require('byu-jwt');
byuJwt.jwtDecoded('ey...gQ', 'http://the-wellknown-url.com')
.then(function(decoded) {
console.log(decoded.byu.client_byu_id); // example output: '123456789'
});
FAQs
The byu-jwt module provides helpful functions to retrieve a specified BYU .well-known URL and verify BYU signed JWTs.
The npm package byu-jwt receives a total of 263 weekly downloads. As such, byu-jwt popularity was classified as not popular.
We found that byu-jwt demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 14 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.
Security News
Sonar’s acquisition of Tidelift highlights a growing industry shift toward sustainable open source funding, addressing maintainer burnout and critical software dependencies.