PasswordCredential Class
A user name and password credential (https://w3c.github.io/webappsec-credential-management/#passwordcredential-interface), stored by navigator.credentials.store() and returned by navigator.credentials.get({ password: true }). The credential store of the user agent is the one of the UserAgentUIBackend: see UserAgentUIBackend.ChooseCredentialAsync and UserAgentUIBackend.StoreCredentialAsync.
public sealed class PasswordCredential : Credential- Inheritance
CredentialPasswordCredential
Constructors
| Name | Description |
|---|---|
| PasswordCredential(HtmlFormElement) | Creates a credential from the fields of a form (https://w3c.github.io/webappsec-credential-management/#construct-passwordcredential-form): the values of its submittable elements whose autofill field name is username (the identifier), current-password or new-password (the password, a new password winning), name or nickname (the name) and photo (the icon URL). The origin is the origin of the document of the current global object. Throws a TypeErrorException when the identifier or the password is empty. |
| PasswordCredential(PasswordCredentialData) | Creates a credential from its data (https://w3c.github.io/webappsec-credential-management/#construct-passwordcredential-data). Throws a TypeErrorException when the identifier, the origin or the password is empty. |
PasswordCredential overloads
PasswordCredential(HtmlFormElement)
PasswordCredential.csCreates a credential from the fields of a form (https://w3c.github.io/webappsec-credential-management/#construct-passwordcredential-form): the values of its submittable elements whose autofill field name is username (the identifier), current-password or new-password (the password, a new password winning), name or nickname (the name) and photo (the icon URL). The origin is the origin of the document of the current global object. Throws a TypeErrorException when the identifier or the password is empty.
public PasswordCredential(HtmlFormElement form)PasswordCredential(PasswordCredentialData)
PasswordCredential.csCreates a credential from its data (https://w3c.github.io/webappsec-credential-management/#construct-passwordcredential-data). Throws a TypeErrorException when the identifier, the origin or the password is empty.
public PasswordCredential(PasswordCredentialData data)Properties
| Name | Description |
|---|---|
| IconUrl | Gets the URL of the image of the account (the empty string when there is none). |
| Id | Gets the identifier of the credential. |
| Name | Gets the name of the account (the empty string when there is none). |
| Origin | Gets the serialization of the origin of the credential ([[origin]]): the site that the credential signs in to. |
| Password | Gets the password. |
| Type | Gets the type of the credential (the [[type]] of its interface, e.g. password or public-key). |
IconUrl
PasswordCredential.csGets the URL of the image of the account (the empty string when there is none).
public string IconUrl { get; }Gets the name of the account (the empty string when there is none).
public string Name { get; }Property value
See also
Origin
PasswordCredential.csPassword
PasswordCredential.csGets the password.
public string Password { get; }Gets the type of the credential (the [[type]] of its interface, e.g. password or public-key).
public override string Type { get; }