Make "Log Out" clear all HTTP auth sessions as well as expiring the master password b=55181 p=vhaarr@firefox.no r=me sr=darin

This commit is contained in:
neil%parkwaycc.co.uk 2004-09-21 16:11:28 +00:00
Родитель bca91b2417
Коммит a01e4f8ff5
1 изменённых файлов: 12 добавлений и 6 удалений

Просмотреть файл

@ -45,11 +45,17 @@
<script type="application/x-javascript"> <script type="application/x-javascript">
<![CDATA[ <![CDATA[
// expire master password // First clears the HTTP auth, then the Wallet
function walletPasswordExpire() { function expireHTTPAuthAndWallet() {
var wallet = Components.classes['@mozilla.org/wallet/wallet-service;1']; // Queries the HTTP Auth Manager and clears all sessions
wallet = wallet.getService(); Components.classes['@mozilla.org/network/http-auth-manager;1']
wallet = wallet.QueryInterface(Components.interfaces.nsIWalletService); .getService(Components.interfaces.nsIHttpAuthManager)
.clearAll();
// Expires the master password
var wallet =
Components.classes['@mozilla.org/wallet/wallet-service;1']
.getService(Components.interfaces.nsIWalletService);
var strings = document.getElementById("menu_passwordManager"); var strings = document.getElementById("menu_passwordManager");
if (wallet.WALLET_ExpirePassword()) { if (wallet.WALLET_ExpirePassword()) {
@ -79,7 +85,7 @@
<menupopup> <menupopup>
<menuitem label="&walletExpirePasswordCmd.label;" <menuitem label="&walletExpirePasswordCmd.label;"
accesskey="&walletExpirePasswordCmd.accesskey;" accesskey="&walletExpirePasswordCmd.accesskey;"
oncommand="walletPasswordExpire();"/> oncommand="expireHTTPAuthAndWallet();"/>
<menuitem label="&walletDisplaySignonsCmd.label;" <menuitem label="&walletDisplaySignonsCmd.label;"
accesskey="&walletDisplaySignonsCmd.accesskey;" accesskey="&walletDisplaySignonsCmd.accesskey;"
oncommand="walletPasswordDialog();"/> oncommand="walletPasswordDialog();"/>