1d8877331f73e7f45cb38db6f8370e8b6910ca6d
3 /***************************************************************************\
4 * SPIP, Systeme de publication pour l'internet *
6 * Copyright (c) 2001-2012 *
7 * Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James *
9 * Ce programme est un logiciel libre distribue sous licence GNU/GPL. *
10 * Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne. *
11 \***************************************************************************/
13 if (!defined('_ECRIRE_INC_VERSION')) return;
16 * Retour d'authentification pour les SSO
18 function action_auth_dist() {
20 $securiser_action = charger_fonction('securiser_action', 'inc');
21 $arg = $securiser_action();
23 if (!preg_match(",^(\w+)[/](.+)$,", $arg, $r)) {
24 spip_log("action_auth_dist $arg pas compris");
27 $auth_methode = $r[1];
29 include_spip('inc/auth');
30 $res = auth_terminer_identifier_login($auth_methode, $login);
32 if (is_string($res)){ // Erreur
33 $redirect = _request('redirect');
34 $redirect = parametre_url($redirect,'var_erreur',$res,'&');
35 include_spip('inc/headers');
36 redirige_par_entete($redirect);
39 // sinon on loge l'auteur identifie, et on finit (redirection automatique)