fedcm.idl (3669B)
1 // GENERATED CONTENT - DO NOT EDIT 2 // Content was automatically extracted by Reffy into webref 3 // (https://github.com/w3c/webref) 4 // Source: Federated Credential Management API (https://w3c-fedid.github.io/FedCM/) 5 6 dictionary IdentityCredentialDisconnectOptions : IdentityProviderConfig { 7 required USVString accountHint; 8 }; 9 10 [Exposed=Window, SecureContext] 11 interface IdentityCredential : Credential { 12 static Promise<undefined> disconnect(IdentityCredentialDisconnectOptions options); 13 readonly attribute any token; 14 readonly attribute boolean isAutoSelected; 15 readonly attribute USVString configURL; 16 }; 17 18 dictionary DisconnectedAccount { 19 required USVString account_id; 20 }; 21 22 dictionary IdentityCredentialErrorInit { 23 DOMString error; 24 USVString url; 25 }; 26 27 [Exposed=Window, SecureContext] 28 interface IdentityCredentialError : DOMException { 29 constructor(optional DOMString message = "", optional IdentityCredentialErrorInit options = {}); 30 readonly attribute DOMString error; 31 readonly attribute USVString url; 32 }; 33 34 partial dictionary CredentialRequestOptions { 35 IdentityCredentialRequestOptions identity; 36 }; 37 38 enum IdentityCredentialRequestOptionsContext { 39 "signin", 40 "signup", 41 "use", 42 "continue" 43 }; 44 45 enum IdentityCredentialRequestOptionsMode { 46 "active", 47 "passive" 48 }; 49 50 dictionary IdentityCredentialRequestOptions { 51 required sequence<IdentityProviderRequestOptions> providers; 52 IdentityCredentialRequestOptionsContext context = "signin"; 53 IdentityCredentialRequestOptionsMode mode = "passive"; 54 }; 55 56 dictionary IdentityProviderConfig { 57 required USVString configURL; 58 required USVString clientId; 59 }; 60 61 dictionary IdentityProviderRequestOptions : IdentityProviderConfig { 62 DOMString loginHint; 63 DOMString domainHint; 64 sequence<USVString> fields; 65 any params; 66 }; 67 68 dictionary IdentityProviderWellKnown { 69 sequence<USVString> provider_urls; 70 USVString accounts_endpoint; 71 USVString login_url; 72 }; 73 74 dictionary IdentityProviderIcon { 75 required USVString url; 76 unsigned long size; 77 }; 78 79 dictionary IdentityProviderBranding { 80 USVString background_color; 81 USVString color; 82 sequence<IdentityProviderIcon> icons; 83 USVString name; 84 }; 85 86 dictionary IdentityProviderAPIConfig { 87 required USVString accounts_endpoint; 88 USVString client_metadata_endpoint; 89 required USVString id_assertion_endpoint; 90 required USVString login_url; 91 USVString disconnect_endpoint; 92 IdentityProviderBranding branding; 93 boolean supports_use_other_account = false; 94 USVString account_label; 95 }; 96 97 dictionary IdentityProviderAccount { 98 required USVString id; 99 USVString name; 100 USVString email; 101 USVString tel; 102 USVString username; 103 USVString given_name; 104 USVString picture; 105 sequence<USVString> approved_clients; 106 sequence<DOMString> login_hints; 107 sequence<DOMString> domain_hints; 108 sequence<DOMString> label_hints; 109 }; 110 dictionary IdentityProviderAccountList { 111 sequence<IdentityProviderAccount> accounts; 112 }; 113 114 dictionary IdentityAssertionResponse { 115 any token; 116 USVString continue_on; 117 IdentityCredentialErrorInit error; 118 }; 119 120 dictionary IdentityProviderClientMetadata { 121 USVString privacy_policy_url; 122 USVString terms_of_service_url; 123 boolean client_is_third_party_to_top_frame_origin = false; 124 }; 125 126 dictionary IdentityUserInfo { 127 USVString email; 128 USVString name; 129 USVString givenName; 130 USVString picture; 131 }; 132 133 dictionary IdentityResolveOptions { 134 USVString accountId; 135 }; 136 137 [Exposed=Window, SecureContext] interface IdentityProvider { 138 static undefined close(); 139 static Promise<undefined> resolve(any token, optional IdentityResolveOptions options = {}); 140 static Promise<sequence<IdentityUserInfo>> getUserInfo(IdentityProviderConfig config); 141 };