superagent-d2l-session-auth
A superagent plugin that adds D2L auth headers
Usage
var request = auth = ; request ;
For strictly iframed applications, consider requiring superagent-d2l-session-auth/framed
instead.
API
auth([Object options])
-> Function
The export is a factory function which creates the superagent plugin. The
result of this call is what should be passed into .use
.
String
(*:*:*)
Option: scope You may optionally specify scope(s) desired on the requested token. This option is passed directly into the backing frau-jwt library.
String
Option: trustedHost You may optionally specify an additional host which is trusted and which authorization tokens should be sent to. This should be generally unnecessary, and should only be an instance of Brightspace.
var auth = trustedHost: 'school.brightspace.com'; request ;
Contributing
-
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.
-
-
Code Style
This repository is configured with EditorConfig and ESLint rules.