MDL-79675 enrol_lti: fix login redirection after library deprecations

v5.7.0 changed this process. Now, we just fetch the URL and do our own
redirect.
https://github.com/packbackbooks/lti-1-3-php-library/releases/tag/v5.7.0
This commit is contained in:
Jake Dallimore
2024-03-06 08:44:14 +08:00
parent f7c12a372d
commit eb94b5677c
+4 -4
View File
@@ -77,10 +77,10 @@ if (empty($_REQUEST['client_id']) && !empty($_REQUEST['id'])) {
}
// Now, do the OIDC login.
LtiOidcLogin::new(
$redirecturl = LtiOidcLogin::new(
new issuer_database(new application_registration_repository(), new deployment_repository()),
new launch_cache_session(),
new lti_cookie()
)
->doOidcLoginRedirect($targetlinkuri)
->doRedirect();
)->getRedirectUrl($targetlinkuri, $_REQUEST);
redirect($redirecturl);