define('PW_LEN', 32); // number of characters to use for random passwords
-function saml_module($a)
-{
-}
+function saml_module() {}
-function saml_init(App $a)
+function saml_init()
{
if (DI::args()->getArgc() < 2) {
return;
saml_metadata();
break;
case 'sso':
- saml_sso_reply($a);
+ saml_sso_reply();
break;
case 'slo':
saml_slo_reply();
Hook::register('footer', __FILE__, 'saml_footer');
}
-function saml_head(App $a, string &$body)
+function saml_head(string &$body)
{
DI::page()->registerStylesheet(__DIR__ . '/saml.css');
}
-function saml_footer(App $a, string &$body)
+function saml_footer(string &$body)
{
$fragment = addslashes(BBCode::convert(DI::config()->get('saml', 'settings_statement')));
$body .= <<<EOL
DI::config()->get('saml', 'idp_cert');
}
-function saml_sso_initiate(App $a, string &$body)
+function saml_sso_initiate(string &$body)
{
if (!saml_is_configured()) {
Logger::warning('SAML SSO tried to trigger, but the SAML addon is not configured yet!');
exit();
}
-function saml_sso_reply(App $a)
+function saml_sso_reply()
{
$auth = new \OneLogin\Saml2\Auth(saml_settings());
$requestID = null;
}
if (!empty($user['uid'])) {
- DI::auth()->setForUser($a, $user);
+ DI::auth()->setForUser($user);
}
if (isset($_POST['RelayState']) && Utils::getSelfURL() != $_POST['RelayState']) {
}
}
-function saml_slo_initiate(App $a)
+function saml_slo_initiate()
{
if (!saml_is_configured()) {
Logger::warning('SAML SLO tried to trigger, but the SAML addon is not configured yet!');
];
}
-function saml_addon_admin(App $a, string &$o)
+function saml_addon_admin(string &$o)
{
$form =
saml_input(
$o = Renderer::replaceMacros($t, $form);
}
-function saml_addon_admin_post(App $a)
+function saml_addon_admin_post()
{
$set = function ($key) {
$val = (!empty($_POST[$key]) ? trim($_POST[$key]) : '');