
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
brightspace-auth-provisioning
Advanced tools
Library for making assertions against an auth service.
npm install @d2l/brightspace-auth-provisioning --save
var AuthTokenProvisioner = require('@d2l/brightspace-auth-provisioning');
var provisioner = new AuthTokenProvisioner({
issuer: 'ece083bc-e6ac-11e4-8e1b-54ee750fffa4',
keyLookup: function () {
return Promise.resolve({
kid: '0a9e68f6-e6ad-11e4-8ab6-54ee750fffa4',
pem: '...'
});
}
});
var tokenPromise = provisioner
.provisionToken({
user: '32647',
tenant: '5492ff8a-e6ad-11e4-84d6-54ee750fffa4',
scopes: ['updates:feed-items:read']
});
new AuthTokenProvisioner(Object options)
-> AuthTokenProvisioner
String
(required)The String
used to identify your local issuer/service. This must be registered
with the auth service.
()
-> Promise<Object>
(required)A function which returns a Promise
to an Object
representing your current
signing key. The object must have the properties kid
, which is a unique
String
, and pem
which is the String
representing the private key.
NOTE: Only RSA keys are supported at this time.
String
(https://auth.proddev.d2l:44331/core)You may optionally specifiy the endpoint of the remote issuer, or auth service.
AbstractProvisioningCache
(AbstractProvisioningCache)You may optionally specify an instance of an object inheriting from
AuthTokenProvisioner.AbstractProvisioningCache
.
.provisionToken(Object options)
-> Promise<String>
Given the set of claims provided, will make an assertion against the auth service. Returns a promise to the encoded access token.
Array<String>
(required)The set of scopes to include in the auth token. The contained scopes should
fit our semantic scope formatting: <group>:<resource>:<permission>
.
String
The GUID of the tenant this token is meant for.
String
The id of the user this token is meant for. Requires the tenant option has been set.
.AbstractProvisioningCache
Available on the export is a reference to the AbstractProvisioningCache
npm test
Fork the repository. Committing directly against this repository is highly discouraged.
Make your modifications in a branch, updating and writing new unit tests
as necessary in the spec
directory.
Ensure that all tests pass with npm test
rebase
your changes against master. Do not merge.
Submit a pull request to this repository. Wait for tests to run and someone to chime in.
This repository is configured with EditorConfig, jscs and JSHint rules. See the docs.dev code style article for information on installing editor extensions.
FAQs
Make token assertions against an auth service
We found that brightspace-auth-provisioning 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.