IdentityCredential Class
A credential of Federated Credential Management (https://w3c-fedid.github.io/FedCM/#browser-api-identity-credential-interface): the token that an identity provider minted for the site, returned by navigator.credentials.get({ identity }) once the user chose an account (see UserAgentUIBackend.ChooseIdentityAccountAsync).
public sealed class IdentityCredential : Credential- Inheritance
CredentialIdentityCredential
Properties
| Name | Description |
|---|---|
| ConfigUrl | Gets the URL of the config file of the identity provider that issued the credential. |
| Id | Gets the identifier of the credential: the empty string. |
| IsAutoSelected | Gets whether the account was selected without asking the user (the auto reauthentication of a returning account). |
| Token | Gets the token minted by the identity provider: the value of the token member of the response of its identity assertion endpoint, or the token given to IdentityProvider.resolve() (a value of the script, or a JSON node without script engine). |
| Type | Gets the type of the credential: identity. |
ConfigUrl
IdentityCredential.csGets the URL of the config file of the identity provider that issued the credential.
public string ConfigUrl { get; }IsAutoSelected
IdentityCredential.csGets whether the account was selected without asking the user (the auto reauthentication of a returning account).
public bool IsAutoSelected { get; }Gets the token minted by the identity provider: the value of the token member of the response of its identity assertion endpoint, or the token given to IdentityProvider.resolve() (a value of the script, or a JSON node without script engine).
public object? Token { get; }Methods
| Name | Description |
|---|---|
| Disconnect(IdentityCredentialDisconnectOptions) | Disconnects an account of an identity provider from the site (https://w3c-fedid.github.io/FedCM/#dom-identitycredential-disconnect): the disconnect endpoint of the provider is called, and the account is removed from the connected accounts. The task fails with a NotAllowedError DomException when the document is not allowed to use the identity-credentials-get feature, an InvalidStateError when the config URL is not valid, and a NetworkError when no account of the provider is connected to the site, a disconnection is pending, or the provider fails. |
Disconnect(IdentityCredentialDisconnectOptions)
IdentityCredential.csDisconnects an account of an identity provider from the site (https://w3c-fedid.github.io/FedCM/#dom-identitycredential-disconnect): the disconnect endpoint of the provider is called, and the account is removed from the connected accounts. The task fails with a NotAllowedError DomException when the document is not allowed to use the identity-credentials-get feature, an InvalidStateError when the config URL is not valid, and a NetworkError when no account of the provider is connected to the site, a disconnection is pending, or the provider fails.
public static Task Disconnect(IdentityCredentialDisconnectOptions options)Parameters
optionsIdentityCredentialDisconnectOptions- The identity provider and the hint of the account.