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.
passwordCredential.additionalData = formData -formData = passwordCredential.additionalData -passwordCredential.additionalData = urlSearchParams -ulrSearchParams = passwordCredential.additionalData -- -
One of a {{domxref("FormData")}} instance, a {{domxref("URLSearchParams")}} instance, - or null.
- -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 - }); - }; -});- -
Specification | -Status | -Comment | -
---|---|---|
{{SpecName('Credential Management')}} | -{{Spec2('Credential Management')}} | -Initial definition. | -
{{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.
-
var idName = PasswordCredential.idName -PasswordCredential.idName = "userID"- -
A {{domxref("USVString")}} represents the name used for the ID field, when submitting - the current object to a remote endpoint via {{domxref("fetch")}}.
- -// TBD- -
Specification | -Status | -Comment | -
---|---|---|
{{SpecName('Credential Management')}} | -{{Spec2('Credential Management')}} | -Initial definition. | -
{{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 @@Inherits properties from its ancestor, {{domxref("Credential")}}.
{{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.
-
var passwordName = PasswordCredential.passwordName -PasswordCredential.passwordName = "passcode"- -
A {{domxref("USVString")}} representing the password field name, used when submitting - the current object to a remote endpoint via {{domxref("fetch")}}.
- -// TBD- -
Specification | -Status | -Comment | -
---|---|---|
{{SpecName('Credential Management')}} | -{{Spec2('Credential Management')}} | -Initial definition. | -
{{Compat("api.PasswordCredential.passwordName")}}