diff options
author | Endi S. Dewata <edewata@redhat.com> | 2014-05-07 19:24:32 -0400 |
---|---|---|
committer | Endi S. Dewata <edewata@redhat.com> | 2014-05-12 19:07:07 -0400 |
commit | 504a01433b5a6a67f843d6ea1f85865212c53141 (patch) | |
tree | 665b56d9e9f7aad328e73e5e97b3c6ebae7969bb /base/server/share/webapps/pki | |
parent | 6dcdd25b49f64b2a23f1dfd78ff6f6333fd2daea (diff) | |
download | pki-504a01433b5a6a67f843d6ea1f85865212c53141.tar.gz pki-504a01433b5a6a67f843d6ea1f85865212c53141.tar.xz pki-504a01433b5a6a67f843d6ea1f85865212c53141.zip |
Added logout support for IE.
The TPS UI logout functionality has been modified to clear the
authentication credential cache on IE.
Ticket #903
Diffstat (limited to 'base/server/share/webapps/pki')
-rw-r--r-- | base/server/share/webapps/pki/js/pki-ui.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/base/server/share/webapps/pki/js/pki-ui.js b/base/server/share/webapps/pki/js/pki-ui.js index 9a1d2e593..d4e270601 100644 --- a/base/server/share/webapps/pki/js/pki-ui.js +++ b/base/server/share/webapps/pki/js/pki-ui.js @@ -46,6 +46,22 @@ var PKI = { } return newContent; + }, + logout: function(options) { + options = options || {}; + if (window.crypto && typeof window.crypto.logout === "function") { // Firefox + window.crypto.logout(); + if (options.success) options.success.call(); + + } else { + var result = document.execCommand("ClearAuthenticationCache", false); + if (result) { // IE + if (options.success) options.success.call(); + + } else { // logout not supported + if (options.error) options.error.call(); + } + } } }; |