From 8fd2c9849fc806d1c0d1040d331f4a719e99d772 Mon Sep 17 00:00:00 2001 From: michaelroytman Date: Mon, 22 Aug 2022 15:11:33 -0400 Subject: [PATCH] feat: decouple LTI handlers from XBlock and improve LTI error handling for unauthenticated users This commit updates the version of the lti-consumer-xblock from 4.3.3 to 4.5.0. This installs the newest version of the lti-consumer-xblock library. This version includes the following changes, from versions 4.4.0 and 4.5.0 of the library. * Move LTI XBlock Handlers to Django Plugin (4.4.0) 1. The functionality of LTI 1.3 Launch Handler is moved from the XBlock to the Django plugin. 2. The functionality of the Access Token endpoint is moved from XBlock to the Django plugin. 3. A new URL format using the LtiConfiguration ID is introduced for the Access Token endpoint and is used when a LTI Consumer is configured without a location allowing LTI integrations to be created without the XBlock context. 4. A new URL format using the LtiConfiguration ID is introduced for the Keyset Endpoint and is used with the location of the XBlock is not available in the configuration. * Handle LtiError Error During LTI 1.1 Launch for Unauthenticated User (4.5.0) 1. Improve error handling for LTI errors raised during LTI 1.1 launch when user is unauthenticated by returning a 400 response instead of falling through to the 500 error. 2. Change the error template to be generic to both LTI 1.1 and LTI 1.3 launches. 3. Revert logging amendments that were made to investigate the nature of the LTI errors. --- requirements/edx/base.txt | 2 +- requirements/edx/development.txt | 2 +- requirements/edx/testing.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/requirements/edx/base.txt b/requirements/edx/base.txt index 17c6eaf9d7..acc597f725 100644 --- a/requirements/edx/base.txt +++ b/requirements/edx/base.txt @@ -666,7 +666,7 @@ libsass==0.10.0 # ora2 loremipsum==1.0.5 # via ora2 -lti-consumer-xblock==4.3.3 +lti-consumer-xblock==4.5.0 # via -r requirements/edx/base.in lxml==4.9.1 # via diff --git a/requirements/edx/development.txt b/requirements/edx/development.txt index 40000a6441..dc896e8c08 100644 --- a/requirements/edx/development.txt +++ b/requirements/edx/development.txt @@ -870,7 +870,7 @@ loremipsum==1.0.5 # via # -r requirements/edx/testing.txt # ora2 -lti-consumer-xblock==4.3.3 +lti-consumer-xblock==4.5.0 # via -r requirements/edx/testing.txt lxml==4.9.1 # via diff --git a/requirements/edx/testing.txt b/requirements/edx/testing.txt index ec2f841daf..aa77535913 100644 --- a/requirements/edx/testing.txt +++ b/requirements/edx/testing.txt @@ -832,7 +832,7 @@ loremipsum==1.0.5 # via # -r requirements/edx/base.txt # ora2 -lti-consumer-xblock==4.3.3 +lti-consumer-xblock==4.5.0 # via -r requirements/edx/base.txt lxml==4.9.1 # via