From 39a29a5c88db77f82bb2b68273e3bf5f653df622 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20J=C3=A4genstedt?= Date: Tue, 9 Mar 2021 13:43:36 +0100 Subject: [PATCH] Remove 3 PasswordCredential attributes which were unshipped (#2969) See https://github.com/mdn/browser-compat-data/pull/9400. --- files/en-us/_redirects.txt | 3 + .../additionaldata/index.html | 75 ------------------- .../api/passwordcredential/idname/index.html | 55 -------------- .../web/api/passwordcredential/index.html | 6 -- .../passwordname/index.html | 55 -------------- 5 files changed, 3 insertions(+), 191 deletions(-) delete mode 100644 files/en-us/web/api/passwordcredential/additionaldata/index.html delete mode 100644 files/en-us/web/api/passwordcredential/idname/index.html delete mode 100644 files/en-us/web/api/passwordcredential/passwordname/index.html diff --git a/files/en-us/_redirects.txt b/files/en-us/_redirects.txt index 91aba3d4b18f09a..ce5a936063e0150 100644 --- a/files/en-us/_redirects.txt +++ b/files/en-us/_redirects.txt @@ -8471,6 +8471,9 @@ /en-US/docs/Web/API/ParentNode.children /en-US/docs/Web/API/ParentNode/children /en-US/docs/Web/API/ParentNode.firstElementChild /en-US/docs/Web/API/ParentNode/firstElementChild /en-US/docs/Web/API/ParentNode.lastElementChild /en-US/docs/Web/API/ParentNode/lastElementChild +/en-US/docs/Web/API/PasswordCredential/additionalData /en-US/docs/Web/API/PasswordCredential +/en-US/docs/Web/API/PasswordCredential/idName /en-US/docs/Web/API/PasswordCredential +/en-US/docs/Web/API/PasswordCredential/passwordName /en-US/docs/Web/API/PasswordCredential /en-US/docs/Web/API/Path2D.Path2D /en-US/docs/Web/API/Path2D/Path2D /en-US/docs/Web/API/Path2D.addPath /en-US/docs/Web/API/Path2D/addPath /en-US/docs/Web/API/PaymentAddress/PaymentAddress.country /en-US/docs/Web/API/PaymentAddress/country diff --git a/files/en-us/web/api/passwordcredential/additionaldata/index.html b/files/en-us/web/api/passwordcredential/additionaldata/index.html deleted file mode 100644 index 4123b43bf793575..000000000000000 --- a/files/en-us/web/api/passwordcredential/additionaldata/index.html +++ /dev/null @@ -1,75 +0,0 @@ ---- -title: PasswordCredential.additionalData -slug: Web/API/PasswordCredential/additionalData -tags: -- API -- Credential Management API -- PasswordCredential -- Property -- Reference -- credential management ---- -

{{SeeCompatTable}}{{APIRef("")}}{{Deprecated_header}}

- -

The additionalData property of - the {{domxref("PasswordCredential")}} interface takes one of a {{domxref("FormData")}} - instance, a {{domxref("URLSearchParams")}} instance, or null. The data in the - objects will be added to the request body and sent to the remote endpoint with the - credentials.

- -

Syntax

- -
passwordCredential.additionalData = formData
-formData = passwordCredential.additionalData
-passwordCredential.additionalData = urlSearchParams
-ulrSearchParams = passwordCredential.additionalData
-
- -

Value

- -

One of a {{domxref("FormData")}} instance, a {{domxref("URLSearchParams")}} instance, - or null.

- -

Example

- -

The following example creates a {{domxref("FormData")}} object with an appended CSRF - token. It then stores the form object in the additionalData parameter, before - sending it to server in a call to {{domxref("fetch")}}.

- -
//The options object was previously created.
-navigator.credentials.get(options).then(function(creds) {
-  if (creds.type == 'password') {
-    var form = new FormData();
-    var csrf_token = document.querySelector('csrf_token').value;
-    form.append('csrf_token', csrf_token);
-
-    creds.additionalData = form;
-
-    fetch('https://www.example.com', {
-      method: 'POST',
-      credentials: creds
-    });
-  };
-});
- -

Specifications

- - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('Credential Management')}}{{Spec2('Credential Management')}}Initial definition.
- -

Browser compatibility

- -

{{Compat("api.PasswordCredential.additionalData")}}

diff --git a/files/en-us/web/api/passwordcredential/idname/index.html b/files/en-us/web/api/passwordcredential/idname/index.html deleted file mode 100644 index 642591b31cd23f3..000000000000000 --- a/files/en-us/web/api/passwordcredential/idname/index.html +++ /dev/null @@ -1,55 +0,0 @@ ---- -title: PasswordCredential.idName -slug: Web/API/PasswordCredential/idName -tags: -- API -- Credential Management API -- NeedsExample -- PasswordCredential -- Property -- Reference -- credential management ---- -

{{SeeCompatTable}}{{APIRef("")}}{{Deprecated_header}}

- -

The idName property of the - {{domxref("PasswordCredential")}} interface returns a {{domxref("USVString")}}, - representing the name that will be used for the ID field, when submitting the - current object to a remote endpoint via {{domxref("fetch")}}. This property defaults to - 'username', but may be set to match whatever your backend service expects. -

- -

Syntax

- -
var idName = PasswordCredential.idName
-PasswordCredential.idName = "userID"
- -

Value

- -

A {{domxref("USVString")}} represents the name used for the ID field, when submitting - the current object to a remote endpoint via {{domxref("fetch")}}.

- -

Example

- -
// TBD
- -

Specifications

- - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('Credential Management')}}{{Spec2('Credential Management')}}Initial definition.
- -

Browser compatibility

- -

{{Compat("api.PasswordCredential.idName")}}

diff --git a/files/en-us/web/api/passwordcredential/index.html b/files/en-us/web/api/passwordcredential/index.html index 75d9f78a35b10ee..65fac4d216fddea 100644 --- a/files/en-us/web/api/passwordcredential/index.html +++ b/files/en-us/web/api/passwordcredential/index.html @@ -29,18 +29,12 @@

Properties

Inherits properties from its ancestor, {{domxref("Credential")}}.

-
{{domxref("PasswordCredential.additionalData")}} {{deprecated_inline()}}{{securecontext_inline}}
-
One of a {{domxref("FormData")}} instance, a {{domxref("URLSearchParams")}} instance, or null. The data in the objects will be added to the {{domxref("request")}} body and sent to the remote endpoint with the credentials.
{{domxref("PasswordCredential.iconURL")}} {{readonlyinline}}{{securecontext_inline}}
A {{domxref("USVString")}} containing a URL pointing to an image for an icon. This image is intended for display in a credential chooser. The URL must be accessible without authentication.
-
{{domxref("PasswordCredential.idName")}} {{deprecated_inline()}}{{securecontext_inline}}
-
A {{domxref("USVString")}} containing the name that will be used for the ID field when submitting the current object to a remote endpoint via {{domxref("fetch")}}. This property defaults to 'username', but may be overridden to match whatever the backend service expects.
{{domxref("PasswordCredential.name")}} {{readonlyinline}}{{securecontext_inline}}
A {{domxref("USVString")}} containing a human-readable public name for display in a credential chooser.
{{domxref("PasswordCredential.password")}} {{readonlyinline}}{{securecontext_inline}}
A {{domxref("USVString")}} containing the password of the credential.
-
{{domxref("PasswordCredential.passwordName")}} {{deprecated_inline()}}{{securecontext_inline}}
-
A {{domxref("USVString")}} representing the name that will be used for the password field when submitting the current object to a remote endpoint via {{domxref("fetch")}}. This property defaults to 'password', but may be overridden to match whatever the backend service expects.

Event handlers

diff --git a/files/en-us/web/api/passwordcredential/passwordname/index.html b/files/en-us/web/api/passwordcredential/passwordname/index.html deleted file mode 100644 index 78832b2cbf52785..000000000000000 --- a/files/en-us/web/api/passwordcredential/passwordname/index.html +++ /dev/null @@ -1,55 +0,0 @@ ---- -title: PasswordCredential.passwordName -slug: Web/API/PasswordCredential/passwordName -tags: -- API -- Credential Management API -- NeedsExample -- PasswordCredential -- Property -- Reference -- credential management ---- -

{{SeeCompatTable}}{{APIRef("")}}{{Deprecated_header}}

- -

The passwordName property of the - {{domxref("PasswordCredential")}} interface returns a {{domxref("USVString")}}, - depicting the name used by the password field, when submitting the current - object to a remote endpoint via {{domxref("fetch")}}. This property defaults to - 'password', but may be matched to anything your backend service expects. -

- -

Syntax

- -
var passwordName = PasswordCredential.passwordName
-PasswordCredential.passwordName = "passcode"
- -

Value

- -

A  {{domxref("USVString")}} representing the password field name, used when submitting - the current object to a remote endpoint via {{domxref("fetch")}}.

- -

Example

- -
// TBD
- -

Specifications

- - - - - - - - - - - - - - -
SpecificationStatusComment
{{SpecName('Credential Management')}}{{Spec2('Credential Management')}}Initial definition.
- -

Browser compatibility

- -

{{Compat("api.PasswordCredential.passwordName")}}