simplesamlphp_auth: optimize login duse simplesamlphp directly instead of Drupal
This commit is contained in:
parent
6c0263d454
commit
aa887347e5
|
@ -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']}/");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Reference in New Issue