Revert "New login method (saml). Ticket#3393"

This reverts commit d69cdb62e1.
This commit is contained in:
Arturo Gonzalez 2016-02-18 16:26:16 +01:00
parent 71ee1381b2
commit cae7f09a78
4 changed files with 10 additions and 36 deletions

View File

@ -87,13 +87,7 @@ echo '
html_print_image ($config['homeurl'] . "/images/pandora_login.png", false, array ("class" => "login_logo", "alt" => "logo", "border" => 0, "title" => $logo_title), false, true);
}
echo '</a>';
echo '<div class="login_button" style="text-align: center;">';
if ($config['auth'] == 'saml') {
html_print_submit_button(__("Login with SAML"), "login_button_saml", false, 'class="sub login_boton"');
}
echo '</div>';
// This prints the current pandora console version.
// For stable/live function it might be wise to comment it out

View File

@ -251,8 +251,8 @@ echo '</form>';
// Event callback for the auth select
function show_selected_rows (event) {
var auth_method = $(this).val();
if ((auth_method !== 'mysql') && (auth_method !== 'saml')) {
if (auth_method !== 'mysql') {
$('tr.remote').show();
show_autocreate_options(null);
}

View File

@ -387,11 +387,4 @@ define("COLLECTION_UNSAVED", 3);
/* PAGINATION */
define("PAGINATION_BLOCKS_LIMIT", 15);
/* SAML attributes constants */
define("ROLES_AND_TAGS", "urn:mace:rediris.es:entitlement:monitoring:");
define("USER_DESC", "commonName");
define("ID_USER_IN_PANDORA", "eduPersonTargetedId");
define("GROUP_IN_PANDORA", "schacHomeOrganization");
define("MAIL_IN_PANDORA", "mail");
?>

View File

@ -178,21 +178,13 @@ if (! isset ($config['id_user']) && isset ($_GET["login"])) {
$pass = get_parameter_post ("pass"); //This is the variable with the password
$nick = db_escape_string_sql($nick);
$pass = db_escape_string_sql($pass);
$login_button_saml = get_parameter("login_button_saml", false);
if (($config['auth'] == 'saml') && $login_button_saml) {
include_once(ENTERPRISE_DIR . "/include/auth/saml.php");
$saml_user_id = saml_process_user_login();
$nick_in_db = $saml_user_id;
}
else {
// process_user_login is a virtual function which should be defined in each auth file.
// It accepts username and password. The rest should be internal to the auth file.
// The auth file can set $config["auth_error"] to an informative error output or reference their internal error messages to it
// process_user_login should return false in case of errors or invalid login, the nickname if correct
$nick_in_db = process_user_login ($nick, $pass);
}
// process_user_login is a virtual function which should be defined in each auth file.
// It accepts username and password. The rest should be internal to the auth file.
// The auth file can set $config["auth_error"] to an informative error output or reference their internal error messages to it
// process_user_login should return false in case of errors or invalid login, the nickname if correct
$nick_in_db = process_user_login ($nick, $pass);
$expired_pass = false;
if (($nick_in_db != false) && ((!is_user_admin($nick)
@ -360,11 +352,6 @@ if (isset ($_GET["bye"])) {
// Unregister Session (compatible with 5.2 and 6.x, old code was deprecated
unset($_SESSION['id_usuario']);
unset($iduser);
if ($config['auth'] == 'saml') {
require_once('/opt/simplesamlphp/lib/_autoload.php');
$as = new SimpleSAML_Auth_Simple('example-userpass');
$as->logout();
}
while (@ob_end_flush ());
exit ("</html>");
}