https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 40dc6ae8bbd4d1ce358402dd518c8ec26439913b authored by Timothy Gu on 31 July 2018, 19:10:11 UTC
Capture readyState changes before document.open too
Tip revision: 40dc6ae
credential-management.idl
// GENERATED CONTENT - DO NOT EDIT
// Content of this file was automatically extracted from the
// "Credential Management Level 1" spec.
// See: https://w3c.github.io/webappsec-credential-management/

[Exposed=Window, SecureContext]
interface Credential {
  readonly attribute USVString id;
  readonly attribute DOMString type;
};

[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<Credential> store(Credential credential);
  Promise<Credential?> create(optional CredentialCreationOptions options);
  Promise<void> preventSilentAccess();
};

dictionary CredentialData {
  required USVString id;
};

dictionary CredentialRequestOptions {
  CredentialMediationRequirement mediation = "optional";
  AbortSignal signal;
};

enum CredentialMediationRequirement {
  "silent",
  "optional",
  "required"
};

dictionary CredentialCreationOptions {
  AbortSignal signal;
};

typedef (FormData or URLSearchParams) CredentialBodyType;

[Constructor(HTMLFormElement form),
 Constructor(PasswordCredentialData data),
 Exposed=Window,
 SecureContext]
interface PasswordCredential : Credential {
  readonly attribute USVString password;
};
PasswordCredential includes CredentialUserData;

partial dictionary CredentialRequestOptions {
  boolean password = false;
};

dictionary PasswordCredentialData : CredentialData {
  USVString name;
  USVString iconURL;
  required USVString password;
};

typedef (PasswordCredentialData or HTMLFormElement) PasswordCredentialInit;

partial dictionary CredentialCreationOptions {
  PasswordCredentialInit password;
};

[Constructor(FederatedCredentialInit data),
 Exposed=Window,
 SecureContext]
interface FederatedCredential : Credential {
  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 provider;
  DOMString protocol;
};

partial dictionary CredentialCreationOptions {
  FederatedCredentialInit federated;
};
back to top