64 lines
3.1 KiB
Text
64 lines
3.1 KiB
Text
/* 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;
|
|
|
|
|
|
native IPCIdentityCredential(mozilla::dom::IPCIdentityCredential);
|
|
[ref] native IPCIdentityCredentialRef(const mozilla::dom::IPCIdentityCredential);
|
|
|
|
[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);
|
|
|
|
// Look for an entry with the tuple (rpPrincipal, idpPrincipal, *).
|
|
void connected(in nsIPrincipal rpPrincipal, in nsIPrincipal idpPrincipal, out boolean connected);
|
|
|
|
// Delete the entry for all tuples (rpPrincipal, idpPrincipal, *).
|
|
void disconnect(in nsIPrincipal rpPrincipal, in nsIPrincipal idpPrincipal);
|
|
|
|
// Store a "lightweight" identity credential
|
|
[noscript]
|
|
void storeIdentityCredential(in IPCIdentityCredentialRef credential);
|
|
|
|
// Retrieve all "lightweight" identity credentials stored by these IDPs
|
|
[noscript]
|
|
Array<IPCIdentityCredential> getIdentityCredentials(in Array<nsIPrincipal> idpPrincipal);
|
|
|
|
// Retrieve all "lightweight" identity credentials stored with this type, for the provided RP
|
|
[noscript]
|
|
Array<IPCIdentityCredential> getIdentityCredentialsOfType(in ACString type);
|
|
|
|
// Delete a "lightweight" identity credential
|
|
[noscript]
|
|
void deleteIdentityCredential(in IPCIdentityCredentialRef credential);
|
|
|
|
// 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);
|
|
};
|