mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-11-26 11:52:59 +01:00
LSauthMethod_HTTP : add LSAUTHMETHOD_HTTP_LOGOUT_REMOTE_URL parameter
This commit is contained in:
parent
bf8eb1b8b9
commit
323cc8bc50
3 changed files with 30 additions and 1 deletions
|
@ -93,6 +93,17 @@
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term>LSAUTHMETHOD_HTTP_LOGOUT_REMOTE_URL</term>
|
||||||
|
<listitem>
|
||||||
|
<para>URL de déconnexion externe, utile par exemple dans le contexte d'une
|
||||||
|
connexion via un service SSO. L'utilisateur sera automatiquement redirigé
|
||||||
|
vers cette URL après sa déconnexion effective au niveau d'LdapSaisie.</para>
|
||||||
|
<note><simpara>Si cette URL de déconnexion n'est pas défini, le bouton de
|
||||||
|
déconnexion sera masqué.</simpara></note>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
</variablelist>
|
</variablelist>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
|
|
@ -47,3 +47,5 @@
|
||||||
*/
|
*/
|
||||||
//define('LSAUTHMETHOD_HTTP_METHOD', 'PHP_PASS');
|
//define('LSAUTHMETHOD_HTTP_METHOD', 'PHP_PASS');
|
||||||
|
|
||||||
|
// Remote logout URL (in SSO context for instance)
|
||||||
|
//define('LSAUTHMETHOD_HTTP_LOGOUT_REMOTE_URL', 'https://idp.domain.tld/logout');
|
||||||
|
|
|
@ -31,6 +31,7 @@ class LSauthMethod_HTTP extends LSauthMethod_basic {
|
||||||
|
|
||||||
public function __construct() {
|
public function __construct() {
|
||||||
LSauth :: disableLoginForm();
|
LSauth :: disableLoginForm();
|
||||||
|
if (!defined('LSAUTHMETHOD_HTTP_LOGOUT_REMOTE_URL'))
|
||||||
LSauth :: disableLogoutBtn();
|
LSauth :: disableLogoutBtn();
|
||||||
return parent :: __construct();
|
return parent :: __construct();
|
||||||
}
|
}
|
||||||
|
@ -102,6 +103,21 @@ class LSauthMethod_HTTP extends LSauthMethod_basic {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* After logout
|
||||||
|
*
|
||||||
|
* This method is run by LSsession after the local session was
|
||||||
|
* was successfully destroyed.
|
||||||
|
*
|
||||||
|
* @retval void
|
||||||
|
**/
|
||||||
|
public static function afterLogout() {
|
||||||
|
if (defined('LSAUTHMETHOD_HTTP_LOGOUT_REMOTE_URL')) {
|
||||||
|
LSsession :: redirect(LSAUTHMETHOD_HTTP_LOGOUT_REMOTE_URL);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue