Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
brightspace-auth-validation
Advanced tools
'use strict';
const http = require('http');
const validator = new (require('brightspace-auth-validation'))();
const server = http
.createServer((req, res) => {
validator
.fromHeaders(req.headers)
.then(token => {
// token is a BrightspaceAuthToken instance
res.statusCode = 201;
res.end('Hi!\n');
}, e => {
console.error(e);
res.statusCode = e.status || 403;
res.end('Sorry, can\'t let you in!\n');
});
})
.listen(3000);
new AuthTokenValidator([Object options])
-> AuthTokenValidator
String
(https://auth.brightspace.com/core)You may optionally specify the auth instance to connect to.
...new AuthTokenValidator({ issuer: 'https://auth.brightspace.com/core' });
Number
(300)You may optionally specify the allowed clock skew, in seconds, when validating time-based claims.
Number
(18000)Deprecated soon
You may optionally specify the length of time, in seconds, to trust a given key without re-confirmation.
String
Recommended. You may optionally specify a name to send as part of the user agent when fetching keys from the issuer. Assists in tracking issues and RCAs.
...new AuthTokenValidator({ name: 'johns-service' })
.fromHeaders(Object headers)
-> Promise<BrightspaceAuthToken>
Given the incoming request headers, will attempt to extract and validate the authorization signature.
.fromSignature(String signature)
-> Promise<BrightspaceAuthToken>
Validates an authorization signature.
.validateConfiguration()
-> Promise<True>
Will attempt to interact with the provided auth instance. Resolves if all is well, or rejects with an error.
FAQs
Validate an incoming Brightspace JWT
The npm package brightspace-auth-validation receives a total of 568 weekly downloads. As such, brightspace-auth-validation popularity was classified as not popular.
We found that brightspace-auth-validation demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.