PublicKeyCredential

This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The PublicKeyCredential interface provides information about a public key / private key pair. It inherits from Credential, and was created by the Web Authentication API exension to the Credential Management API. Other interfaces that inherit from Credential are PasswordCredential and FederatedCredential.

Properties

PublicKeyCredential.type Read only
Inherited from Credential. Always set to "public-key" for PublicKeyCredentials.
PublicKeyCredential.id Read only
Inherited from Credential and overridden to be a base64 encoding of PublicKeyCredential.rawId.
PublicKeyCredential.rawId Read only
An ArrayBuffer that holds the globally unique identifier for this PublicKeyCredential. This identifier can be used to look up credentials for future calls to CredentialsContainer.get.
PublicKeyCredential.response Read only
An instance of an AuthenticatorResponse object. It is either of type AuthenticatorAttestationResponse if the PublicKeyCredential was the results of a create() call, or of type AuthenticatorAssertionResponse if the PublicKeyCredential was the result of a get() call.

Methods

PublicKeyCredential.getClientExtensionResults()
If any extensions were requested, this method will return the results of processing those extensions.

Specifications

Specification Status Comment
Web Authentication: An API for accessing Public Key Credentials Level 1 Candidate Recommendation Initial definition.

Browser compatibility

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support651 2 ?601 ? ? ?
rawId651 2 ?601 ? ? ?
response651 2 ?601 ? ? ?
getClientExtensionResults651 2 ?601 ? ? ?
isUserVerifyingPlatformAuthenticatorAvailable651 2 ?601 ? ? ?
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support ? ? ? ? ? ? ?
rawId ? ? ? ? ? ? ?
response ? ? ? ? ? ? ?
getClientExtensionResults ? ? ? ? ? ? ?
isUserVerifyingPlatformAuthenticatorAvailable ? ? ? ? ? ? ?

1. Only support USB U2F tokens

2. From version 65: this feature is behind the Web Authentication API preference (needs to be set to Enabled). To change preferences in Chrome, visit chrome://flags.

Document Tags and Contributors

 Contributors to this page: ExE-Boss, Garitz, apowers313
 Last updated by: ExE-Boss,