Source code

Revision control

Copy as Markdown

Other Tools

// GENERATED CONTENT - DO NOT EDIT
// Content was automatically extracted by Reffy into webref
// Source: Credential Management Level 1 (https://w3c.github.io/webappsec-credential-management/)
[Exposed=Window, SecureContext]
interface Credential {
readonly attribute USVString id;
readonly attribute DOMString type;
static Promise<boolean> isConditionalMediationAvailable();
static Promise<undefined> willRequestConditionalCreation();
};
[SecureContext]
interface mixin CredentialUserData {
readonly attribute USVString name;
readonly attribute USVString iconURL;
};
partial interface Navigator {
[SecureContext, SameObject] readonly attribute CredentialsContainer credentials;
};
[Exposed=Window, SecureContext]
interface CredentialsContainer {
Promise<Credential?> get(optional CredentialRequestOptions options = {});
Promise<undefined> store(Credential credential);
Promise<Credential?> create(optional CredentialCreationOptions options = {});
Promise<undefined> preventSilentAccess();
};
dictionary CredentialData {
required USVString id;
};
dictionary CredentialRequestOptions {
CredentialMediationRequirement mediation = "optional";
AbortSignal signal;
};
enum CredentialMediationRequirement {
"silent",
"optional",
"conditional",
"required"
};
dictionary CredentialCreationOptions {
CredentialMediationRequirement mediation = "optional";
AbortSignal signal;
};
[Exposed=Window,
SecureContext]
interface PasswordCredential : Credential {
constructor(HTMLFormElement form);
constructor(PasswordCredentialData data);
readonly attribute USVString password;
};
PasswordCredential includes CredentialUserData;
partial dictionary CredentialRequestOptions {
boolean password = false;
};
dictionary PasswordCredentialData : CredentialData {
USVString name;
USVString iconURL;
required USVString origin;
required USVString password;
};
typedef (PasswordCredentialData or HTMLFormElement) PasswordCredentialInit;
partial dictionary CredentialCreationOptions {
PasswordCredentialInit password;
};
[Exposed=Window,
SecureContext]
interface FederatedCredential : Credential {
constructor(FederatedCredentialInit data);
readonly attribute USVString provider;
readonly attribute DOMString? protocol;
};
FederatedCredential includes CredentialUserData;
dictionary FederatedCredentialRequestOptions {
sequence<USVString> providers;
sequence<DOMString> protocols;
};
partial dictionary CredentialRequestOptions {
FederatedCredentialRequestOptions federated;
};
dictionary FederatedCredentialInit : CredentialData {
USVString name;
USVString iconURL;
required USVString origin;
required USVString provider;
DOMString protocol;
};
partial dictionary CredentialCreationOptions {
FederatedCredentialInit federated;
};