CredentialsContainer Class

The credentials API of a window (https://w3c.github.io/webappsec-credential-management/#credentialscontainer): navigator.credentials. The library implements the Web Authentication credentials (PublicKeyCredential), whose authenticators are given by BrowsingContextOptions.WebAuthentication.

public sealed class CredentialsContainer

Methods

NameDescription
Create(CredentialCreationOptions?)Creates a credential (https://w3c.github.io/webappsec-credential-management/#algorithm-create): a Web Authentication registration when CredentialCreationOptions.PublicKey is set. The task fails with an InvalidStateError DomException when the document is not fully active, a NotSupportedError when the options request no supported type of credential, a NotAllowedError when the document is not allowed to use the publickey-credentials-create feature or a request is already pending, and the errors of the ceremony.
Get(CredentialRequestOptions?)Requests a credential (https://w3c.github.io/webappsec-credential-management/#algorithm-request): a Web Authentication assertion when CredentialRequestOptions.PublicKey is set. The task fails with an InvalidStateError DomException when the document is not fully active, a NotSupportedError when the options request no supported type of credential, a NotAllowedError when the document is not allowed to use the publickey-credentials-get feature or a request is already pending, and the errors of the ceremony.
PreventSilentAccess()https://w3c.github.io/webappsec-credential-management/#dom-credentialscontainer-preventsilentaccess: it has no effect on the public key credentials, which always require an interaction of the user.
Store(Credential)Stores a credential (https://w3c.github.io/webappsec-credential-management/#algorithm-store). The public key credentials cannot be stored: the task fails with a NotSupportedError DomException.

Create(CredentialCreationOptions?)

CredentialsContainer.cs

Creates a credential (https://w3c.github.io/webappsec-credential-management/#algorithm-create): a Web Authentication registration when CredentialCreationOptions.PublicKey is set. The task fails with an InvalidStateError DomException when the document is not fully active, a NotSupportedError when the options request no supported type of credential, a NotAllowedError when the document is not allowed to use the publickey-credentials-create feature or a request is already pending, and the errors of the ceremony.

public Task<Credential?> Create(CredentialCreationOptions? options = null)

Get(CredentialRequestOptions?)

CredentialsContainer.cs

Requests a credential (https://w3c.github.io/webappsec-credential-management/#algorithm-request): a Web Authentication assertion when CredentialRequestOptions.PublicKey is set. The task fails with an InvalidStateError DomException when the document is not fully active, a NotSupportedError when the options request no supported type of credential, a NotAllowedError when the document is not allowed to use the publickey-credentials-get feature or a request is already pending, and the errors of the ceremony.

public Task<Credential?> Get(CredentialRequestOptions? options = null)

PreventSilentAccess()

CredentialsContainer.cs

https://w3c.github.io/webappsec-credential-management/#dom-credentialscontainer-preventsilentaccess: it has no effect on the public key credentials, which always require an interaction of the user.

public Task PreventSilentAccess()

Store(Credential)

CredentialsContainer.cs

Stores a credential (https://w3c.github.io/webappsec-credential-management/#algorithm-store). The public key credentials cannot be stored: the task fails with a NotSupportedError DomException.

public Task Store(Credential credential)