mirror of
https://github.com/mediacms-io/mediacms.git
synced 2026-01-20 07:12:58 -05:00
wtv
This commit is contained in:
@@ -229,8 +229,12 @@ class DjangoToolConfig(ToolConfAbstract):
|
|||||||
|
|
||||||
# Set tool's private key for signing (e.g., Deep Linking responses)
|
# Set tool's private key for signing (e.g., Deep Linking responses)
|
||||||
key_obj = LTIToolKeys.get_or_create_keys()
|
key_obj = LTIToolKeys.get_or_create_keys()
|
||||||
# Pass the full JWK dict (includes kid) - PyLTI1p3 will handle conversion
|
jwk_obj = jwk.JWK(**key_obj.private_key_jwk)
|
||||||
registration.set_tool_private_key(key_obj.private_key_jwk)
|
pem_bytes = jwk_obj.export_to_pem(private_key=True, password=None)
|
||||||
|
|
||||||
|
# Set both the key and kid directly on Registration internal attributes
|
||||||
|
registration._tool_private_key = pem_bytes.decode('utf-8')
|
||||||
|
registration._tool_private_key_kid = key_obj.private_key_jwk['kid']
|
||||||
|
|
||||||
return registration
|
return registration
|
||||||
|
|
||||||
@@ -255,8 +259,12 @@ class DjangoToolConfig(ToolConfAbstract):
|
|||||||
|
|
||||||
# Set tool's private key for signing (e.g., Deep Linking responses)
|
# Set tool's private key for signing (e.g., Deep Linking responses)
|
||||||
key_obj = LTIToolKeys.get_or_create_keys()
|
key_obj = LTIToolKeys.get_or_create_keys()
|
||||||
# Pass the full JWK dict (includes kid) - PyLTI1p3 will handle conversion
|
jwk_obj = jwk.JWK(**key_obj.private_key_jwk)
|
||||||
registration.set_tool_private_key(key_obj.private_key_jwk)
|
pem_bytes = jwk_obj.export_to_pem(private_key=True, password=None)
|
||||||
|
|
||||||
|
# Set both the key and kid directly on Registration internal attributes
|
||||||
|
registration._tool_private_key = pem_bytes.decode('utf-8')
|
||||||
|
registration._tool_private_key_kid = key_obj.private_key_jwk['kid']
|
||||||
|
|
||||||
return registration
|
return registration
|
||||||
|
|
||||||
|
|||||||
@@ -144,8 +144,8 @@ class SelectMediaView(View):
|
|||||||
# Get deep linking settings from original launch data
|
# Get deep linking settings from original launch data
|
||||||
deep_linking_settings = message_launch_data.get('https://purl.imsglobal.org/spec/lti-dl/claim/deep_linking_settings', {})
|
deep_linking_settings = message_launch_data.get('https://purl.imsglobal.org/spec/lti-dl/claim/deep_linking_settings', {})
|
||||||
|
|
||||||
# Create DeepLink instance directly
|
# Create DeepLink instance with tool_config for key retrieval
|
||||||
deep_link = DeepLink(registration, deployment_id, deep_linking_settings)
|
deep_link = DeepLink(registration, deployment_id, deep_linking_settings, tool_config=tool_config)
|
||||||
|
|
||||||
# Convert content_items to DeepLinkResource objects
|
# Convert content_items to DeepLinkResource objects
|
||||||
resources = []
|
resources = []
|
||||||
|
|||||||
Reference in New Issue
Block a user