Source code

Revision control

Copy as Markdown

Other Tools

/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsISupports.idl"
#include "nsIPrincipal.idl"
webidl IdentityCredential;
[scriptable, builtinclass, uuid(029823d0-0448-46c5-af1f-25cd4501d0d7)]
interface nsIIdentityCredentialStorageService : nsISupports {
// Store the registered and allowLogout bit for the tuple (rpPrincipal, idpPrincipal, credentialID).
// This goes straight to disk if rpPrincipal is not in Private Browsing mode and stays in memory otherwise.
// Additionally, if rpPrincipal is private, it will be cleared when the user closes the last private browsing window.
void setState(in nsIPrincipal rpPrincipal, in nsIPrincipal idpPrincipal, in ACString credentialID, in boolean registered, in boolean allowLogout);
// Retrieve the registered and allowLogout bits for the tuple (rpPrincipal, idpPrincipal, credentialID).
// This will always return defaults, even if there was never a value stored or it was deleted.
void getState(in nsIPrincipal rpPrincipal, in nsIPrincipal idpPrincipal, in ACString credentialID, out boolean registered, out boolean allowLogout);
// Delete the entry for the tuple (rpPrincipal, idpPrincipal, credentialID).
void delete(in nsIPrincipal rpPrincipal, in nsIPrincipal idpPrincipal, in ACString credentialID);
// Delete all data in this service.
void clear();
// Delete all data stored under a tuple with rpPrincipal that has the given base domain
void deleteFromBaseDomain(in ACString baseDomain);
// Delete all data stored under a tuple with a given rpPrincipal
void deleteFromPrincipal(in nsIPrincipal rpPrincipal);
// Delete all data stored in the given time range (microseconds since epoch)
void deleteFromTimeRange(in PRTime aFrom, in PRTime aTo);
// Delete all data matching the given Origin Attributes pattern
void deleteFromOriginAttributesPattern(in AString aPattern);
};