Skip to content
Snippets Groups Projects
Commit 46291928 authored by Simon Chen's avatar Simon Chen Committed by Simon Chen
Browse files

fix: use launch_url for oidc login target_link_uri parameter

parent 081786ac
No related branches found
No related tags found
No related merge requests found
...@@ -367,6 +367,18 @@ Changelog ...@@ -367,6 +367,18 @@ Changelog
Please See the [releases tab](https://github.com/edx/xblock-lti-consumer/releases) for the complete changelog. Please See the [releases tab](https://github.com/edx/xblock-lti-consumer/releases) for the complete changelog.
3.4.1 - 2022-02-01
------------------
* Fix the target_link_uri parameter on OIDC login preflight url parameter so it matches
claim message definition of the field.
See docs at https://www.imsglobal.org/spec/lti/v1p3#target-link-uri
3.4.0 - 2022-01-31
------------------
* Fix the version number by bumping it up to 3.4.0
3.3.0 - 2022-01-20 3.3.0 - 2022-01-20
------------------- -------------------
......
...@@ -4,4 +4,4 @@ Runtime will load the XBlock class from here. ...@@ -4,4 +4,4 @@ Runtime will load the XBlock class from here.
from .apps import LTIConsumerApp from .apps import LTIConsumerApp
from .lti_xblock import LtiConsumerXBlock from .lti_xblock import LtiConsumerXBlock
__version__ = '3.4.0' __version__ = '3.4.1'
...@@ -93,7 +93,6 @@ def get_lti_1p3_launch_info(config_id=None, block=None): ...@@ -93,7 +93,6 @@ def get_lti_1p3_launch_info(config_id=None, block=None):
if lti_consumer.dl is not None: if lti_consumer.dl is not None:
deep_linking_launch_url = lti_consumer.prepare_preflight_url( deep_linking_launch_url = lti_consumer.prepare_preflight_url(
callback_url=get_lms_lti_launch_link(),
hint=lti_config.location, hint=lti_config.location,
lti_hint="deep_linking_launch" lti_hint="deep_linking_launch"
) )
...@@ -140,7 +139,6 @@ def get_lti_1p3_launch_start_url(config_id=None, block=None, deep_link_launch=Fa ...@@ -140,7 +139,6 @@ def get_lti_1p3_launch_start_url(config_id=None, block=None, deep_link_launch=Fa
# Prepare and return OIDC flow start url # Prepare and return OIDC flow start url
return lti_consumer.prepare_preflight_url( return lti_consumer.prepare_preflight_url(
callback_url=get_lms_lti_launch_link(),
hint=hint, hint=hint,
lti_hint=lti_hint lti_hint=lti_hint
) )
......
...@@ -84,9 +84,7 @@ def lti_preflight_request(request): ...@@ -84,9 +84,7 @@ def lti_preflight_request(request):
The platform needs to know the tool OIDC endpoint. The platform needs to know the tool OIDC endpoint.
""" """
lti_consumer = _get_lti1p3_consumer() lti_consumer = _get_lti1p3_consumer()
context = lti_consumer.prepare_preflight_url( context = lti_consumer.prepare_preflight_url()
callback_url=get_lms_lti_launch_link()
)
# This template should render a simple redirection to the URL # This template should render a simple redirection to the URL
# provided by the context through the `oidc_url` key above. # provided by the context through the `oidc_url` key above.
......
...@@ -90,7 +90,6 @@ class LtiConsumer1p3: ...@@ -90,7 +90,6 @@ class LtiConsumer1p3:
def prepare_preflight_url( def prepare_preflight_url(
self, self,
callback_url,
hint="hint", hint="hint",
lti_hint="lti_hint" lti_hint="lti_hint"
): ):
...@@ -102,7 +101,7 @@ class LtiConsumer1p3: ...@@ -102,7 +101,7 @@ class LtiConsumer1p3:
"iss": self.iss, "iss": self.iss,
"client_id": self.client_id, "client_id": self.client_id,
"lti_deployment_id": self.deployment_id, "lti_deployment_id": self.deployment_id,
"target_link_uri": callback_url, "target_link_uri": self.launch_url,
"login_hint": hint, "login_hint": hint,
"lti_message_hint": lti_hint "lti_message_hint": lti_hint
} }
......
...@@ -149,7 +149,6 @@ class TestLti1p3Consumer(TestCase): ...@@ -149,7 +149,6 @@ class TestLti1p3Consumer(TestCase):
Check if preflight request is properly formed and has all required keys. Check if preflight request is properly formed and has all required keys.
""" """
preflight_request_data = self.lti_consumer.prepare_preflight_url( preflight_request_data = self.lti_consumer.prepare_preflight_url(
callback_url=LAUNCH_URL,
hint="test-hint", hint="test-hint",
lti_hint="test-lti-hint" lti_hint="test-lti-hint"
) )
......
...@@ -60,7 +60,6 @@ def load_block_as_anonymous_user(location): ...@@ -60,7 +60,6 @@ def load_block_as_anonymous_user(location):
student_data=None, student_data=None,
course_id=location.course_key, course_id=location.course_key,
track_function=None, track_function=None,
xqueue_callback_url_prefix="",
request_token="", request_token="",
) )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment