summaryrefslogtreecommitdiffstats
path: root/base/server/share/webapps/pki
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2014-03-10 13:04:19 -0400
committerEndi S. Dewata <edewata@redhat.com>2014-03-13 14:59:30 -0400
commit19dfeb9f4e3439541877acaf1bf63e02a9b64482 (patch)
tree54361c6769314c0e628af4f144f4e0ee9f22e56a /base/server/share/webapps/pki
parentbdac4a9604463f1c81f411e06af59564f6c02c77 (diff)
downloadpki-19dfeb9f4e3439541877acaf1bf63e02a9b64482.tar.gz
pki-19dfeb9f4e3439541877acaf1bf63e02a9b64482.tar.xz
pki-19dfeb9f4e3439541877acaf1bf63e02a9b64482.zip
Added login page for TPS UI.
The TPS UI has been modified to provide an unprotected front page. The main TPS UI has been moved into a protected area. The front page provides a login button which when clicked will ask the user to authenticate with the client certificate. If the authentication is successful, the main page will appear. There is also a logout link on the upper right corner of the main page. When clicked it will destroy both the client and server sessions. Ticket #846
Diffstat (limited to 'base/server/share/webapps/pki')
-rw-r--r--base/server/share/webapps/pki/js/pki-ui.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/base/server/share/webapps/pki/js/pki-ui.js b/base/server/share/webapps/pki/js/pki-ui.js
index 7626d5082..73ba63b26 100644
--- a/base/server/share/webapps/pki/js/pki-ui.js
+++ b/base/server/share/webapps/pki/js/pki-ui.js
@@ -132,8 +132,13 @@ var Navigation = Backbone.View.extend({
var link = $("a", li);
var url = link.attr("href");
link.click(function(e) {
- // get page name
- if (url.charAt(0) == "#" && url.length > 1) {
+ if (url == "#logout") {
+ if (options.logout) {
+ options.logout.call(self);
+ }
+
+ } else if (url.charAt(0) == "#" && url.length > 1) {
+ // get page name
var name = url.substring(1);
self.load(name);
}