From fbc78e7944d3efc5e387953cd6b0387e32a59eb0 Mon Sep 17 00:00:00 2001 From: Markos Gogoulos Date: Mon, 29 Dec 2025 19:23:55 +0200 Subject: [PATCH] wtv --- lti/deep_linking.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lti/deep_linking.py b/lti/deep_linking.py index 5a5e6ff4..1e3b4b39 100644 --- a/lti/deep_linking.py +++ b/lti/deep_linking.py @@ -198,9 +198,13 @@ class SelectMediaView(View): # Create JWT payload tool_issuer = request.build_absolute_uri('/')[:-1] + + # Per LTI spec, aud should be the platform's issuer URL (or an array with issuer and optionally client_id) + audience = [platform.platform_id] + payload = { 'iss': tool_issuer, # Tool's issuer (MediaCMS URL) - 'aud': [platform.client_id], + 'aud': audience, 'exp': now + 3600, 'iat': now, 'nonce': str(uuid.uuid4()), @@ -213,7 +217,7 @@ class SelectMediaView(View): print("JWT Payload:") print(f" iss (issuer): {tool_issuer}") - print(f" aud (audience): {platform.client_id}") + print(f" aud (audience): {audience}") print(f" deployment_id: {deployment_id}") print(f" content_items count: {len(lti_content_items)}")