diff --git a/drupal/simplesamlphp_auth/simplesamlphp/config/config.php b/drupal/simplesamlphp_auth/simplesamlphp/config/config.php index 8188ca3..7488033 100644 --- a/drupal/simplesamlphp_auth/simplesamlphp/config/config.php +++ b/drupal/simplesamlphp_auth/simplesamlphp/config/config.php @@ -25,9 +25,10 @@ $config = array ( // prod 'baseurlpath' => 'https://www.montpellier-agglo.com/simplesamlphp/', // recette - // 'baseurlpath' => 'https://www-test.entrouvert.montpellier-agglo.com/simplesamlphp/', + // 'baseurlpath' => 'https://www-test.entrouvert.montpellier-agglo.com/simplesamlphp/', // dev - // 'baseurlpath' => 'simplesamlphp/', + // 'baseurlpath' => 'simplesamlphp/', + 'baseurlpath' => 'https://www-test.entrouvert.montpellier-agglo.com/simplesamlphp/', 'certdir' => 'cert/', 'loggingdir' => 'log/', 'datadir' => 'data/', diff --git a/drupal/simplesamlphp_auth/simplesamlphp_auth.module b/drupal/simplesamlphp_auth/simplesamlphp_auth.module index 85bf7cf..64a8187 100644 --- a/drupal/simplesamlphp_auth/simplesamlphp_auth.module +++ b/drupal/simplesamlphp_auth/simplesamlphp_auth.module @@ -174,6 +174,9 @@ function simplesamlphp_auth_loginpage() { $gotourl = $returnto; } + if (($_simplesamlphp_auth_as->isAuthenticated()) && (!empty($_SERVER['HTTPS'])) ) { + return drupal_goto("http://${_SERVER['SERVER_NAME']}/"); + } // If a ReturnTo has been set. if ($gotourl) { @@ -469,7 +472,7 @@ function simplesamlphp_auth_user_logout($account) { $gotourl = variable_get('simplesamlphp_auth_logoutgotourl', ''); } - $_simplesamlphp_auth_as->logout($gotourl); + $_simplesamlphp_auth_as->logout("http://${_SERVER['SERVER_NAME']}/"); } }