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']}/"); } /**