From aa887347e5a389d3c3f882a06d2e3132e97dc9d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Schneider?= Date: Mon, 9 Sep 2013 16:20:31 +0200 Subject: [PATCH] simplesamlphp_auth: optimize login duse simplesamlphp directly instead of Drupal --- drupal/simplesamlphp_auth/simplesamlphp_auth.module | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drupal/simplesamlphp_auth/simplesamlphp_auth.module b/drupal/simplesamlphp_auth/simplesamlphp_auth.module index e55154f..cb1ac3d 100644 --- a/drupal/simplesamlphp_auth/simplesamlphp_auth.module +++ b/drupal/simplesamlphp_auth/simplesamlphp_auth.module @@ -152,7 +152,8 @@ function simplesamlphp_auth_loginpage() { } // Require the user to be authenticated. - $_simplesamlphp_auth_as->requireAuth(); + //$_simplesamlphp_auth_as->requireAuth(); + return drupal_goto("https://${_SERVER['SERVER_NAME']}/simplesamlphp/module.php/core/as_login.php?ReturnTo=http://${_SERVER['SERVER_NAME']}/saml_login&AuthId=default-sp"); // If the user is authenticated, send them along. @@ -174,12 +175,9 @@ function simplesamlphp_auth_loginpage() { $gotourl = $returnto; } - if (($_simplesamlphp_auth_as->isAuthenticated()) && (!empty($_SERVER['HTTPS'])) ) { - return drupal_goto("http://${_SERVER['SERVER_NAME']}/saml_login"); - } } - return drupal_goto(base_path()); + return drupal_goto("http://${_SERVER['SERVER_NAME']}/"); } /**