W3cubDocs

/DOM

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 extension 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 the base64url 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 compatibilityUpdate compatibility data on GitHub

Desktop
Chrome Edge Firefox Internet Explorer Opera Safari
Basic support 65
Disabled
65
Disabled
Only support USB U2F tokens
Disabled 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.
18 60
60
Only support USB U2F tokens
? ? ?
rawId 65
Disabled
65
Disabled
Only support USB U2F tokens
Disabled 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.
18 60
60
Only support USB U2F tokens
? ? ?
response 65
Disabled
65
Disabled
Only support USB U2F tokens
Disabled 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.
18 60
60
Only support USB U2F tokens
? ? ?
getClientExtensionResults 65
Disabled
65
Disabled
Only support USB U2F tokens
Disabled 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.
18 60
60
Only support USB U2F tokens
? ? ?
isUserVerifyingPlatformAuthenticatorAvailable 65
Disabled
65
Disabled
Only support USB U2F tokens
Disabled 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.
18 60
60
Only support USB U2F tokens
? ? ?
Mobile
Android webview Chrome for Android Edge Mobile Firefox for Android Opera for Android iOS Safari Samsung Internet
Basic support ? ? ? ? ? ? ?
rawId ? ? ? ? ? ? ?
response ? ? ? ? ? ? ?
getClientExtensionResults ? ? ? ? ? ? ?
isUserVerifyingPlatformAuthenticatorAvailable ? ? ? ? ? ? ?

© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/PublicKeyCredential