Backed out 4 changesets (bug 1879154) for causing bustage on nsUserCharacteristics...
[gecko.git] / dom / webidl / IdentityCredential.webidl
blob801b2dc0f84e81163c1e041c00e4c5c784b8d11a
1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
4  * You can obtain one at http://mozilla.org/MPL/2.0/.
5  *
6  * The origin of this IDL file is
7  * https://fedidcg.github.io/FedCM
8  */
11 [Exposed=Window, SecureContext,
12  Pref="dom.security.credentialmanagement.identity.enabled"]
13 interface IdentityCredential : Credential {
14  readonly attribute USVString? token;
15  [Throws]
16  static Promise<undefined> logoutRPs(sequence<IdentityCredentialLogoutRPsRequest> logoutRequests);
19 dictionary IdentityCredentialRequestOptions {
20  sequence<IdentityProviderConfig> providers;
23 [GenerateConversionToJS]
24 dictionary IdentityProviderConfig {
25  required UTF8String configURL;
26  required USVString clientId;
27  USVString nonce;
30 // https://fedidcg.github.io/FedCM/#dictdef-identityproviderwellknown
31 [GenerateInit]
32 dictionary IdentityProviderWellKnown {
33   required sequence<UTF8String> provider_urls;
36 // https://fedidcg.github.io/FedCM/#dictdef-identityprovidericon
37 dictionary IdentityProviderIcon {
38   required USVString url;
39   unsigned long size;
42 // https://fedidcg.github.io/FedCM/#dictdef-identityproviderbranding
43 dictionary IdentityProviderBranding {
44   USVString background_color;
45   USVString color;
46   sequence<IdentityProviderIcon> icons;
47   USVString name;
50 // https://fedidcg.github.io/FedCM/#dictdef-identityproviderapiconfig
51 [GenerateInit, GenerateConversionToJS]
52 dictionary IdentityProviderAPIConfig {
53   required UTF8String accounts_endpoint;
54   required UTF8String client_metadata_endpoint;
55   required UTF8String id_assertion_endpoint;
56   IdentityProviderBranding branding;
60 // https://fedidcg.github.io/FedCM/#dictdef-identityprovideraccount
61 dictionary IdentityProviderAccount {
62   required USVString id;
63   required USVString name;
64   required USVString email;
65   USVString given_name;
66   USVString picture;
67   sequence<USVString> approved_clients;
70 // https://fedidcg.github.io/FedCM/#dictdef-identityprovideraccountlist
71 [GenerateInit, GenerateConversionToJS]
72 dictionary IdentityProviderAccountList {
73   sequence<IdentityProviderAccount> accounts;
76 // https://fedidcg.github.io/FedCM/#dictdef-identityproviderclientmetadata
77 [GenerateInit, GenerateConversionToJS]
78 dictionary IdentityProviderClientMetadata {
79   USVString privacy_policy_url;
80   USVString terms_of_service_url;
83 // https://fedidcg.github.io/FedCM/#dictdef-identityprovidertoken
84 [GenerateInit]
85 dictionary IdentityProviderToken {
86   required USVString token;
89 // https://fedidcg.github.io/FedCM/#dictdef-identitycredentiallogoutrpsrequest
90 dictionary IdentityCredentialLogoutRPsRequest {
91   required UTF8String url;
92   required UTF8String accountId;