Skip to content

Commit

Permalink
Expose passwords to JavaScript in Credential Manager API
Browse files Browse the repository at this point in the history
This change implements the proposed change to the Credential Manager API
to directly expose passwords to JavaScript. It also deprecates the
existing PasswordCredential attributes and the ability to attach a
Credential to fetch.

See the corresponding GitHub issue and pull request for more details:
- w3c/webappsec-credential-management#75
- w3c/webappsec-credential-management#76

- Intent to Deprecate: Custom fetch for Credential Manager API:
https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/WPckvg8JO0U

- Intent to Implement and Ship: The password property of PasswordCredential:
https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/nT51eE7fWn4

BUG=718416

Review-Url: https://codereview.chromium.org/2852423002
Cr-Commit-Position: refs/heads/master@{#473576}
  • Loading branch information
jdoerrie authored and chromium-wpt-export-bot committed May 22, 2017
1 parent 28b490c commit 66a1bb9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
assert_equals(credential.name, '');
assert_equals(credential.iconURL, '');
assert_equals(credential.type, 'password');
// TODO(jdoerrie): Add checks for 'credential.password'.
assert_equals(credential.password, 'pencil');
});
}, "navigator.credentials.create() with valid PasswordCredentialData");

Expand All @@ -43,6 +43,7 @@
assert_equals(credential.name, 'friendly name');
assert_equals(credential.iconURL, 'https://example.com/photo');
assert_equals(credential.type, 'password');
assert_equals(credential.password, 'sekrit');
});
}, "navigator.credentials.create() with valid HTMLFormElement");

Expand Down
5 changes: 1 addition & 4 deletions credential-management/idl.https.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,7 @@
Exposed=Window,
SecureContext]
interface PasswordCredential : Credential {
attribute USVString idName;
attribute USVString passwordName;

attribute CredentialBodyType? additionalData;
readonly attribute DOMString password;
};
PasswordCredential implements CredentialUserData;

Expand Down

0 comments on commit 66a1bb9

Please sign in to comment.