2 $core->url
->register('xorgAuth', 'Xorg', '^auth/(.*)$', array('xorgAuthentifier', 'doAuth'));
5 static public function widget(&$w) {
7 if ($core->auth
->xorg_infos
['forlife']) {
8 return '<p>Tu es ' . $core->auth
->xorg_infos
['prenom'] . ' ' . $core->auth
->xorg_infos
['nom'] . '<br />'
9 . '<a href="auth/exit">déconnexion</a></p>';
11 return '<p><a href="auth/Xorg?path=' . $_SERVER['REQUEST_URI'] . '">M\'authentifier via Polytechnique.org</a></p>';
16 class xorgAuthentifier
extends dcUrlHandlers
{
17 static public function doAuth($args) {
21 $core->auth
->killSession();
24 if ($core->auth
->callXorg($_GET['path'])) {
25 header('Location: http://murphy.m4x.org' . $_GET['path']);
30 $core->auth
->returnXorg();