EOL;
}
-function saml_is_configured()
+function saml_is_configured(): bool
{
return
DI::config()->get('saml', 'idp_id') &&
$auth = new \OneLogin\Saml2\Auth(saml_settings());
$ssoBuiltUrl = $auth->login(null, [], false, false, true);
DI::session()->set('AuthNRequestID', $auth->getLastRequestID());
- header('Pragma: no-cache');
- header('Cache-Control: no-cache, must-revalidate');
- header('Location: ' . $ssoBuiltUrl);
- exit();
+ System::externalRedirect($ssoBuiltUrl);
}
function saml_sso_reply()
}
$auth = new \OneLogin\Saml2\Auth(saml_settings());
-
$sloBuiltUrl = $auth->logout();
DI::session()->set('LogoutRequestID', $auth->getLastRequestID());
- header('Pragma: no-cache');
- header('Cache-Control: no-cache, must-revalidate');
- header('Location: ' . $sloBuiltUrl);
- exit();
+ System::externalRedirect($sloBuiltUrl);
}
function saml_slo_reply()
}
}
-function saml_input($key, $label, $description)
+function saml_input($key, $label, $description): array
{
return [
'$' . $key => [
}
}
-function saml_settings()
+function saml_settings(): array
{
return [
function tumblr_probe_detect(array &$hookData)
{
- // Don't overwrite an existing result
- if (isset($hookData['result'])) {
- return;
- }
+ $t = Renderer::getMarkupTemplate( 'admin.tpl', 'addon/tumblr/' );
// Avoid a lookup for the wrong network
if (!in_array($hookData['network'], ['', Protocol::TUMBLR])) {