caccl-authorizer
Advanced tools
Comparing version 1.0.26 to 1.0.27
@@ -7,2 +7,17 @@ const randomstring = require('randomstring'); | ||
/** | ||
* Generates an LTI launch body | ||
* @param {object} profile - the Canvas profile of the user that is being | ||
* launched | ||
* @param {object} course - the Canvas course the user is launching from | ||
* @param {string} [canvasHost=canvas.instructure.com] - the hostname of the | ||
* Canvas instance | ||
* @param {string} [locale=en] - the locale of the user | ||
* @param {string} [userEmail=primary email from profile] - the email of the | ||
* user | ||
* @param {string} [appName=Unnamed App] - the name of the app being launched | ||
* from (nav launch) | ||
* @param {object} [assignment=null] - if included, the LTI launch is an | ||
* external tool assignment launch based on this assignment | ||
*/ | ||
module.exports = (options) => { | ||
@@ -72,3 +87,5 @@ const [last, first] = options.profile.sortable_name.split(', '); | ||
body.launch_presentation_width = null; // Not applicable | ||
body.lis_person_contact_email_primary = options.userEmail; | ||
body.lis_person_contact_email_primary = ( | ||
options.userEmail || options.profile.primary_email | ||
); | ||
body.lis_person_name_family = last; | ||
@@ -82,3 +99,3 @@ body.lis_person_name_full = options.profile.name; | ||
body.resource_link_id = options.course.uuid; | ||
body.resource_link_title = options.appName; | ||
body.resource_link_title = options.appName || 'Unnamed App'; | ||
body.roles = roles.join(','); | ||
@@ -85,0 +102,0 @@ body.tool_consumer_info_product_family_code = 'canvas'; |
{ | ||
"name": "caccl-authorizer", | ||
"version": "1.0.26", | ||
"version": "1.0.27", | ||
"description": "Acquires Canvas tokens through via OAuth, stores refresh tokens, and refreshes access tokens when they expire.", | ||
@@ -32,4 +32,4 @@ "main": "index.js", | ||
"body-parser": "^1.19.0", | ||
"caccl": "^1.0.97", | ||
"caccl-canvas-partial-simulator": "^1.0.26", | ||
"caccl": "^1.0.102", | ||
"caccl-canvas-partial-simulator": "^1.0.27", | ||
"dce-selenium": "^1.0.43", | ||
@@ -50,3 +50,3 @@ "eslint": "^5.16.0", | ||
"dependencies": { | ||
"caccl-api": "^1.0.36", | ||
"caccl-api": "^1.0.37", | ||
"caccl-error": "^1.0.3", | ||
@@ -53,0 +53,0 @@ "caccl-lti": "^1.0.18", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
87384
2014
Updatedcaccl-api@^1.0.37