1. after logout, krb auth no longer shows "session expired" but correct
"Authentication with Kerberos failed".

2. "The password or username you entered is incorrect." is showed on
failed forms-based auth.

https://fedorahosted.org/freeipa/ticket/5163
--
Petr Vobornik
From 88181b081dc696ec5c7709081b4b7abf72a5015a Mon Sep 17 00:00:00 2001
From: Petr Vobornik <pvobo...@redhat.com>
Date: Tue, 28 Jul 2015 14:01:34 +0200
Subject: [PATCH] webui: fix regressions failed auth messages

1. after logout, krb auth no longer shows "session expired" but correct
"Authentication with Kerberos failed".

2. "The password or username you entered is incorrect." is showed on
failed forms-based auth.

https://fedorahosted.org/freeipa/ticket/5163
---
 install/ui/src/freeipa/ipa.js                 | 8 ++++----
 install/ui/src/freeipa/widgets/LoginScreen.js | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/install/ui/src/freeipa/ipa.js b/install/ui/src/freeipa/ipa.js
index 75dd73c379815a0e0e1dc2c4d786fdcf3be7c1b0..eaaaaf7fcfaee873d97d96630b72365ecffe6b08 100644
--- a/install/ui/src/freeipa/ipa.js
+++ b/install/ui/src/freeipa/ipa.js
@@ -32,6 +32,7 @@ define([
         './json2',
         './_base/i18n',
         './auth',
+        './config',
         './datetime',
         './metadata',
         './builder',
@@ -41,7 +42,8 @@ define([
         './util',
         'exports'
     ], function(declare, Deferred, Evented, keys, topic, $, JSON, i18n, auth,
-        datetime, metadata_provider, builder, reg, rpc, text, util, exports) {
+        config, datetime, metadata_provider, builder, reg, rpc, text,
+        util, exports) {
 
 /**
  * @class
@@ -127,11 +129,9 @@ var IPA = function () {
         // if current path matches live server path, use live data
         if (that.url && window.location.pathname.substring(0, that.url.length) === that.url) {
             that.json_url = params.url || '/ipa/session/json';
-            that.login_url = params.url || '/ipa/session/login_kerberos';
 
         } else { // otherwise use fixtures
             that.json_path = params.url || "test/data";
-            // that.login_url is not needed for fixtures
         }
 
         $.ajaxSetup(that.ajax_options);
@@ -377,7 +377,7 @@ IPA.get_credentials = function() {
     }
 
     var request = {
-        url: IPA.login_url,
+        url: config.krb_login_url,
         cache: false,
         type: "GET",
         success: success_handler,
diff --git a/install/ui/src/freeipa/widgets/LoginScreen.js b/install/ui/src/freeipa/widgets/LoginScreen.js
index fb7ccccc6c34d9c1c7115dd95809f3a39de488eb..eb95b9161f05eeac1ec9aed286c9730dada85d59 100644
--- a/install/ui/src/freeipa/widgets/LoginScreen.js
+++ b/install/ui/src/freeipa/widgets/LoginScreen.js
@@ -232,8 +232,8 @@ define(['dojo/_base/declare',
                     this.set('view', 'reset');
                     val_summary.add_info('login', this.password_expired);
                 } else {
+                    password_f.set_value('');
                     val_summary.add_error('login', this.form_auth_failed);
-                    password_f.set_value('');
                 }
             }));
         },
-- 
2.4.3

-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Reply via email to