Source code
Revision control
Copy as Markdown
Other Tools
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* 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,
*
* The origin of this IDL file is
*/
[Exposed=Window, SecureContext,
Pref="dom.security.credentialmanagement.identity.enabled"]
interface IdentityCredential : Credential {
[Throws]
static Promise<undefined> disconnect(optional IdentityCredentialDisconnectOptions options = {});
readonly attribute UTF8String? token;
};
enum IdentityCredentialRequestOptionsMode {
"active",
"passive"
};
dictionary IdentityCredentialRequestOptions {
required sequence<IdentityProviderRequestOptions> providers;
IdentityCredentialRequestOptionsMode mode = "passive";
};
[GenerateConversionToJS]
dictionary IdentityProviderConfig {
required UTF8String configURL;
required UTF8String clientId;
};
[GenerateConversionToJS]
dictionary IdentityProviderRequestOptions : IdentityProviderConfig {
UTF8String nonce;
UTF8String loginHint;
UTF8String domainHint;
};
dictionary IdentityCredentialDisconnectOptions : IdentityProviderConfig {
required UTF8String accountHint;
};
[GenerateInit]
dictionary IdentityProviderWellKnown {
required sequence<UTF8String> provider_urls;
UTF8String accounts_endpoint;
};
dictionary IdentityProviderIcon {
required UTF8String url;
unsigned long size;
};
dictionary IdentityProviderBranding {
USVString background_color;
USVString color;
sequence<IdentityProviderIcon> icons;
USVString name;
};
[GenerateInit, GenerateConversionToJS]
dictionary IdentityProviderAPIConfig {
required UTF8String accounts_endpoint;
// We do not want to gather consent for identity providers, so we
// required UTF8String client_metadata_endpoint;
required UTF8String id_assertion_endpoint;
UTF8String disconnect_endpoint;
IdentityProviderBranding branding;
UTF8String account_label;
};
dictionary IdentityProviderAccount {
required USVString id;
required USVString name;
required USVString email;
USVString given_name;
USVString picture;
sequence<USVString> approved_clients;
sequence<UTF8String> login_hints;
sequence<UTF8String> domain_hints;
sequence<UTF8String> label_hints;
};
[GenerateInit, GenerateConversionToJS]
dictionary IdentityProviderAccountList {
sequence<IdentityProviderAccount> accounts;
};
[GenerateInit, GenerateConversionToJS]
dictionary IdentityProviderClientMetadata {
USVString privacy_policy_url;
USVString terms_of_service_url;
};
[GenerateInit]
dictionary IdentityAssertionResponse {
UTF8String token;
UTF8String continue_on;
};
[GenerateInit]
dictionary DisconnectedAccount {
required UTF8String account_id;
};
dictionary IdentityResolveOptions {
UTF8String accountId;
};
[Exposed=Window, SecureContext,
Pref="dom.security.credentialmanagement.identity.enabled"]
interface IdentityProvider {
static undefined close();
[Throws]
static Promise<undefined> resolve(UTF8String token, optional IdentityResolveOptions options = {});
// static Promise<sequence<IdentityUserInfo>> getUserInfo(IdentityProviderConfig config); Bug 1945589: Not yet implemented
};