Comparing version 1.0.3 to 1.0.4
@@ -24,2 +24,2 @@ # NonceStore | ||
"Nonce expired." – If timestamp is older than 1 minute. | ||
"Nonce already used." – If nonce has already been used. | ||
"Nonce already used." – If nonce has already been used. |
12
index.js
@@ -117,5 +117,5 @@ const Validator = require('./Validator'); | ||
// Add simpler role booleans | ||
if (res.session.launchInfo.extRoles) { | ||
if (req.session.launchInfo.extRoles) { | ||
req.session.launchInfo.isInstructor = ( | ||
res.session.launchInfo.extRoles.includes( | ||
req.session.launchInfo.extRoles.includes( | ||
'urn:lti:role:ims/lis/Instructor' | ||
@@ -125,3 +125,3 @@ ) | ||
req.session.launchInfo.isTA = ( | ||
res.session.launchInfo.extRoles.includes( | ||
req.session.launchInfo.extRoles.includes( | ||
'urn:lti:role:ims/lis/TeachingAssistant' | ||
@@ -131,3 +131,3 @@ ) | ||
req.session.launchInfo.isDesigner = ( | ||
res.session.launchInfo.extRoles.includes( | ||
req.session.launchInfo.extRoles.includes( | ||
'urn:lti:role:ims/lis/ContentDeveloper' | ||
@@ -137,3 +137,3 @@ ) | ||
req.session.launchInfo.isCreditLearner = ( | ||
res.session.launchInfo.extRoles.includes( | ||
req.session.launchInfo.extRoles.includes( | ||
'urn:lti:role:ims/lis/Learner' | ||
@@ -143,3 +143,3 @@ ) | ||
req.session.launchInfo.isNonCreditLearner = ( | ||
res.session.launchInfo.extRoles.includes( | ||
req.session.launchInfo.extRoles.includes( | ||
'urn:lti:role:ims/lis/Learner/NonCreditLearner' | ||
@@ -146,0 +146,0 @@ ) |
{ | ||
"name": "caccl-lti", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "LTI launch validator for IMS-LTI standard launches.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -77,3 +77,8 @@ const oauth = require('oauth-signature'); | ||
// > Build URL | ||
const path = urlLib.parse(req.originalUrl || req.url).pathname; | ||
const originalUrl = req.originalUrl || req.url; | ||
if (!originalUrl) { | ||
// No url: cannot sign the request | ||
return false; | ||
} | ||
const path = urlLib.parse(originalUrl).pathname; | ||
const url = req.protocol + '://' + req.headers.host + path; | ||
@@ -80,0 +85,0 @@ // > Remove oauth signature from body |
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
165008
3873