This commit is contained in:
Markos Gogoulos
2025-12-29 19:03:31 +02:00
parent 59be9f16c0
commit d0ebe19c2a

View File

@@ -228,12 +228,9 @@ class DjangoToolConfig(ToolConfAbstract):
registration.set_key_set_url(config.get('key_set_url')) registration.set_key_set_url(config.get('key_set_url'))
# Set tool's private key for signing (e.g., Deep Linking responses) # Set tool's private key for signing (e.g., Deep Linking responses)
private_key_pem = self.get_jwk(iss, config.get('client_id')) key_obj = LTIToolKeys.get_or_create_keys()
if private_key_pem: # Pass the full JWK dict (includes kid) - PyLTI1p3 will handle conversion
registration.set_tool_private_key(private_key_pem) registration.set_tool_private_key(key_obj.private_key_jwk)
# Set key ID so it's included in JWT header
key_obj = LTIToolKeys.get_or_create_keys()
registration.set_kid(key_obj.private_key_jwk['kid'])
return registration return registration
@@ -257,12 +254,9 @@ class DjangoToolConfig(ToolConfAbstract):
registration.set_key_set_url(config.get('key_set_url')) registration.set_key_set_url(config.get('key_set_url'))
# Set tool's private key for signing (e.g., Deep Linking responses) # Set tool's private key for signing (e.g., Deep Linking responses)
private_key_pem = self.get_jwk(iss, config.get('client_id')) key_obj = LTIToolKeys.get_or_create_keys()
if private_key_pem: # Pass the full JWK dict (includes kid) - PyLTI1p3 will handle conversion
registration.set_tool_private_key(private_key_pem) registration.set_tool_private_key(key_obj.private_key_jwk)
# Set key ID so it's included in JWT header
key_obj = LTIToolKeys.get_or_create_keys()
registration.set_kid(key_obj.private_key_jwk['kid'])
return registration return registration