Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion dist/Provider/Provider.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ class Provider {
message: 'Missing parameter: "openid_configuration".'
}
});
const message = await this.DynamicRegistration.register(req.query.openid_configuration, req.query.registration_token);
const {
message
} = await this.DynamicRegistration.register(req.query.openid_configuration, req.query.registration_token);
res.setHeader('Content-type', 'text/html');
res.send(message);
} catch (err) {
Expand Down Expand Up @@ -341,6 +343,7 @@ class Provider {
version: valid['https://purl.imsglobal.org/spec/lti/claim/version'],
deepLinkingSettings: valid['https://purl.imsglobal.org/spec/lti-dl/claim/deep_linking_settings'],
lis: valid['https://purl.imsglobal.org/spec/lti/claim/lis'],
valid,
...additionalContextProperties
};

Expand Down
6 changes: 5 additions & 1 deletion dist/Provider/Services/DynamicRegistration.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,11 @@ class DynamicRegistration {
});

// Returing message indicating the end of registration flow
return '<script>(window.opener || window.parent).postMessage({subject:"org.imsglobal.lti.close"}, "*");</script>';
return {
configuration,
platform: registered,
message: '<script>(window.opener || window.parent).postMessage({subject:"org.imsglobal.lti.close"}, "*");</script>'
};
}
}
function _buildUrl(url, path) {
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{
"name": "ltijs",
"version": "5.9.9",
"name": "@theforage/ltijs",
"version": "5.9.17",
"publishConfig": {
"access": "restricted",
"@theforage:registry": "https://npm.pkg.github.com"
},
"description": "Easily turn your web application into a LTI 1.3 Learning Tool.",
"main": "index.js",
"engineStrict": true,
Expand Down
3 changes: 2 additions & 1 deletion src/Provider/Provider.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class Provider {
#dynamicRegistrationCallback = async (req, res, next) => {
try {
if (!req.query.openid_configuration) return res.status(400).send({ status: 400, error: 'Bad Request', details: { message: 'Missing parameter: "openid_configuration".' } })
const message = await this.DynamicRegistration.register(req.query.openid_configuration, req.query.registration_token)
const { message } = await this.DynamicRegistration.register(req.query.openid_configuration, req.query.registration_token)
res.setHeader('Content-type', 'text/html')
res.send(message)
} catch (err) {
Expand Down Expand Up @@ -303,6 +303,7 @@ class Provider {
version: valid['https://purl.imsglobal.org/spec/lti/claim/version'],
deepLinkingSettings: valid['https://purl.imsglobal.org/spec/lti-dl/claim/deep_linking_settings'],
lis: valid['https://purl.imsglobal.org/spec/lti/claim/lis'],
valid,
...additionalContextProperties
}

Expand Down
6 changes: 5 additions & 1 deletion src/Provider/Services/DynamicRegistration.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,11 @@ class DynamicRegistration {
await this.#Database.Insert(false, 'platformStatus', { id: await registered.platformId(), active: this.#autoActivate })

// Returing message indicating the end of registration flow
return '<script>(window.opener || window.parent).postMessage({subject:"org.imsglobal.lti.close"}, "*");</script>'
return {
configuration,
platform: registered,
message: '<script>(window.opener || window.parent).postMessage({subject:"org.imsglobal.lti.close"}, "*");</script>'
}
}
}

Expand Down