aboutsummaryrefslogtreecommitdiff
path: root/lib/classes
diff options
context:
space:
mode:
Diffstat (limited to 'lib/classes')
-rw-r--r--lib/classes/LTI13a/Registration.php13
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/classes/LTI13a/Registration.php b/lib/classes/LTI13a/Registration.php
index 096519e..2ce1e8d 100644
--- a/lib/classes/LTI13a/Registration.php
+++ b/lib/classes/LTI13a/Registration.php
@@ -110,7 +110,8 @@ class Registration implements RegistrationInterface
if ($this->tool) {
return $this->tool->getToolData();
} elseif ($this->platform) {
- //TODO: Use the global tool configuration for Stud.IP as LTI tool.
+ //Return the global tool:
+ return \LtiTool::getGlobalTool();
}
//If no tool or platform is present, the registration is not linked to a tool.
throw new \Studip\LTIException(
@@ -186,7 +187,11 @@ class Registration implements RegistrationInterface
}
return $keyring->toKeyChain();
} elseif ($this->platform) {
- //TODO: return the global tool key chain.
+ //Return the global tool keychain.
+ $keyring = \LtiTool::getGlobalToolKeyring(true);
+ if ($keyring) {
+ return $keyring->toKeyChain();
+ }
}
return null;
@@ -208,8 +213,8 @@ class Registration implements RegistrationInterface
if ($this->tool) {
return $this->tool->jwks_url ?? null;
} else {
- //TODO: Return the global JWKS URL for Stud.IP as LTI tool.
- return null;
+ //Return the global JWKS URL for Stud.IP as LTI tool.
+ return \LtiTool::getGlobalJwksUrl();
}
}
}