Firefox Tomorrow

web api interface

Credential

View on MDN ↗

Secure context

The Credential interface of the Credential Management API provides information about an entity (usually a user) normally as a prerequisite to a trust decision.

Credential objects may be of the following types:

Instance properties

Static methods

Examples

const pwdCredential = new PasswordCredential({
  id: "example-username", // Username/ID
  name: "Carina Anand", // Display name
  password: "correct horse battery staple", // Password
});

console.assert(pwdCredential.type === "password");

Specifications

SpecificationsStandards references are available on the canonical MDN page.

Browser compatibility

Browser compatibilityCompatibility data is available on the canonical MDN page.