Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LTI 1.3 Deep Linking Launch URL missing Custom Parameters #427

Open
abonnell opened this issue Nov 7, 2023 · 0 comments
Open

LTI 1.3 Deep Linking Launch URL missing Custom Parameters #427

abonnell opened this issue Nov 7, 2023 · 0 comments

Comments

@abonnell
Copy link

abonnell commented Nov 7, 2023

Custom Parameters were added to the repository as part of its 9.6.2 release via #392 , but this seems to have accidentally omitted the required changes from the Deep Linking config url

Line 129 of lti_consumer.api

if deep_linking_enabled:
        launch_data.message_type = "LtiDeepLinkingRequest"
        deep_linking_launch_url = lti_consumer.prepare_preflight_url(
            launch_data,
        )

calls lti_consumer.lti_1p3.consumer.prepare_preflight_url

    def prepare_preflight_url(
            self,
            launch_data,
    ):
        """
        Generates OIDC url with parameters
        """
        user_id = launch_data.external_user_id if launch_data.external_user_id else launch_data.user_id

        # Set the launch_data in the cache. An LTI 1.3 launch involves two "legs" - the third party initiated
        # login request (the preflight request) and the actual launch -, and this information must be shared between
        # the two requests. A simple example is the intended LTI launch message of the LTI launch. This value is
        # known at the time that preflight request is made, but it is not accessible when the tool responds to the
        # preflight request and the platform must craft a launch request. This library stores the launch_data in the
        # cache and includes the cache key as the lti_message_hint query or form parameter to retrieve it later.
        launch_data_key = cache_lti_1p3_launch_data(launch_data)

        oidc_url = self.oidc_url + "?"

        login_hint = user_id

        parameters = {
            "iss": self.iss,
            "client_id": self.client_id,
            "lti_deployment_id": self.deployment_id,
            "target_link_uri": self.launch_url,
            "login_hint": login_hint,
            "lti_message_hint": launch_data_key,
        }

        return oidc_url + urlencode(parameters)

and we can see the custom params are not being included in that parameters dict to be appended to the oidc launch url, which is what Deep Linking generates as part of the first time config/setup portion of the connection

Talking with Michael a little bit it looks like this is boiling down to this claim in the lti1p3 consumer, it is being set explicitly as include_extra_claims=False here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant