Simple utility to get a json web token in a D2L free range application (frau).
npm install frau-jwt --save
var jwt = require('frau-jwt');
jwt('a:b:c')
.then(function (token) {
// do a thing with the token
});
Requests a JWT with the given scope from the hosting LMS. If in an ifrau, the request will be delegated to the frame host. The resulting token will be cached until it expires.
If scope is provided, then it will be sent as the request scope of the token.
It should be a properly formatted String, with scopes seperated by spaces.
Defaults to *:*:*
.
foo:bar:baz
a:b:c x:y:z
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 and ESLint rules.