| // Copyright 2022 The Chromium Authors |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| // https://fedidcg.github.io/FedCM/#browser-api-identity-credential-interface |
| |
| dictionary IdentityCredentialDisconnectOptions : IdentityProviderConfig { |
| required USVString accountHint; |
| }; |
| |
| [ |
| Exposed=Window, |
| SecureContext, |
| RuntimeEnabled=FedCm |
| ] interface IdentityCredential : Credential { |
| // https://fedidcg.github.io/FedCM/#dom-identitycredential-token |
| [CallWith=ScriptState] readonly attribute any token; |
| |
| // Whether an account was automatically selected in the FedCM flow. |
| readonly attribute boolean isAutoSelected; |
| |
| // The config URL of the selected identity provider. |
| [RuntimeEnabled=FedCmMultipleIdentityProviders] readonly attribute USVString configURL; |
| |
| // https://github.com/fedidcg/FedCM/pull/515 |
| [CallWith=ScriptState, RaisesException, MeasureAs=FedCmDisconnect] static Promise<undefined> disconnect(IdentityCredentialDisconnectOptions options); |
| }; |