From 368c624a7445f6d3a34993a3835026bb383506e4 Mon Sep 17 00:00:00 2001 From: Petr Voborník Date: Mon, 27 Feb 2012 15:31:20 +0100 Subject: Forms based authentication UI Support for forms based authentication was added to UI. It consist of: 1) new login page Page url is [ipa server]/ipa/ui/login.html Page contains a login form. For authentication it sends ajax request at [ipa server]/session/json/login_password. If authentication is successfull page is redirected to [ipa server]/ipa/ui if it fails from whatever reason a message is shown. 2) new enhanced error dialog - authorization_dialog. This dialog is displayed when user is not authorized to perform action - usually when ticket and session expires. It is a standard error dialog which shows kerberos ticket related error message and newly offers (as a link) to use form based authentication. If user click on the link, the dialog content and buttons switch to login dialog which has same functionality as 'new login page'. User is able to return back to the error message by clicking on a back button. login.html uses same css styles as migration page -> ipa-migration.css was merged into ipa.css. https://fedorahosted.org/freeipa/ticket/2450 --- freeipa.spec.in | 6 +- install/migration/Makefile.am | 1 - install/migration/error.html | 1 - install/migration/index.html | 1 - install/migration/invalid.html | 5 +- install/migration/ipa_migration.css | 96 ------------ install/ui/Makefile.am | 2 + install/ui/dialog.js | 39 +++-- install/ui/field.js | 6 +- install/ui/ipa.css | 99 +++++++++++- install/ui/ipa.js | 289 ++++++++++++++++++++++++++++++------ install/ui/jsl.conf | 1 + install/ui/login.html | 51 +++++++ install/ui/login.js | 76 ++++++++++ install/ui/test/data/ipa_init.json | 8 +- install/ui/widget.js | 1 - ipalib/plugins/internal.py | 6 + 17 files changed, 527 insertions(+), 161 deletions(-) delete mode 100644 install/migration/ipa_migration.css create mode 100644 install/ui/login.html create mode 100644 install/ui/login.js diff --git a/freeipa.spec.in b/freeipa.spec.in index 90c8e9f8d..fc5370b37 100644 --- a/freeipa.spec.in +++ b/freeipa.spec.in @@ -551,10 +551,10 @@ fi %{_usr}/share/ipa/migration/error.html %{_usr}/share/ipa/migration/index.html %{_usr}/share/ipa/migration/invalid.html -%{_usr}/share/ipa/migration/ipa_migration.css %{_usr}/share/ipa/migration/migration.py* %dir %{_usr}/share/ipa/ui %{_usr}/share/ipa/ui/index.html +%{_usr}/share/ipa/ui/login.html %{_usr}/share/ipa/ui/logout.html %{_usr}/share/ipa/ui/*.ico %{_usr}/share/ipa/ui/*.css @@ -675,6 +675,10 @@ fi %ghost %attr(0644,root,apache) %config(noreplace) %{_sysconfdir}/ipa/ca.crt %changelog +* Wed Feb 29 2012 Petr Vobornik - 2.99.0-21 +- Add Web UI form based login page +- Removed ipa_migration.css + * Wed Feb 29 2012 Petr Vobornik - 2.99.0-20 - Add Web UI logout page diff --git a/install/migration/Makefile.am b/install/migration/Makefile.am index aa5713640..b90578015 100644 --- a/install/migration/Makefile.am +++ b/install/migration/Makefile.am @@ -5,7 +5,6 @@ app_DATA = \ error.html \ index.html \ invalid.html \ - ipa_migration.css \ migration.py \ $(NULL) diff --git a/install/migration/error.html b/install/migration/error.html index 85ff4c1f6..9e1e3bd0b 100644 --- a/install/migration/error.html +++ b/install/migration/error.html @@ -6,7 +6,6 @@ - diff --git a/install/migration/index.html b/install/migration/index.html index 908162b89..eb816b35d 100644 --- a/install/migration/index.html +++ b/install/migration/index.html @@ -6,7 +6,6 @@ - diff --git a/install/migration/invalid.html b/install/migration/invalid.html index d1ba60ac4..4f4693406 100644 --- a/install/migration/invalid.html +++ b/install/migration/invalid.html @@ -4,9 +4,8 @@ IPA: Identity Policy Audit - + - @@ -27,11 +26,9 @@

Login

-

Please re-enter your username or password

The password or username you entered is incorrect. Please try again (make sure your caps lock is off).

If the problem persists, contact your administrator.

-