Problem/Motivation

Some LMSs send a "data" attribute in the deep_linking_settings that needs to be returned to the LMS in the JWT generated based on the LTI 1.3 Deep link specification.

The oat library accepts that parameter, but the LTI Tool Provider module is not sending it, so it comes as null and deep link does not work.
It works in Canvas because it does not send the data parameter in the payload, but D2L and Schoology, for example, send it and the requests fail.

Steps to reproduce

Try to launch deep link and return a link in Schoology or D2L.

Proposed resolution

Need to pass all the parameters to the DeepLinkingLaunchResponseBuilder and not only those three.

This is the current code
$builder = new DeepLinkingLaunchResponseBuilder();
$message = $builder->buildDeepLinkingLaunchResponse($resourceCollection, $event->getRegistration(), $event->getReturn());

And these are all the parameters that the builder accepts. data must come if it comes in the request (and the deploymentId too):

ResourceCollectionInterface $resourceCollection,
RegistrationInterface $registration,
string $deepLinkingReturnUrl,
?string $deploymentId = null,
?string $deepLinkingData = null,
?string $deepLinkingMessage = null,
?string $deepLinkingLog = null,
array $optionalClaims = []
)

Remaining tasks

User interface changes

API changes

Surely the event LtiToolProviderContentResourceEvent will need to include more attributes.

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

    Comments

    ddelblanco_2 created an issue. See original summary.

    d34dman’s picture

    @ddelblanco_2 am not too familiar with this, I could try to create a MR if you share some "links" that would reach Drupal containing those parameters (obfuscated values should be ok).

    bob.hinrichs’s picture

    Version: 2.0.5 » 3.0.0

    Checked against 3.0.0 — not fixed there. LTIToolProviderContentReturn::route() still calls buildDeepLinkingLaunchResponse() with only the three required arguments, so deploymentId, deepLinkingData, deepLinkingMessage and deepLinkingLog stay at their null defaults. The
    deep-linking library was bumped to ^4 in 3.0.0, but the builder still accepts those as optional params (4th–7th) and the call site was never updated.

    The root cause is a step earlier: in LTIToolProviderContentSelect::route() the incoming DeepLinkingSettingsClaim is read but only getDeepLinkingReturnUrl() is used — the `data` value (getData()) is never captured, so it isn't available to echo back on return (which
    is what D2L/Schoology require). A complete fix needs to (1) capture `data` (and ideally the deployment id) from the claim at select time, (2) thread it through the select → list → return round-trip, and (3) pass it into buildDeepLinkingLaunchResponse().