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
.
PublicKeyCredential.type
Read only
Credential
. Always set to "public-key" for PublicKeyCredentials.PublicKeyCredential.id
Read only
Credential
and overridden to be the base64url encoding of PublicKeyCredential.rawId.PublicKeyCredential.rawId
Read only
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
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.PublicKeyCredential.getClientExtensionResults()
Specification | Status | Comment |
---|---|---|
Web Authentication: An API for accessing Public Key Credentials Level 1 | Candidate Recommendation | Initial definition. |
Desktop | ||||||
---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | |
Basic support | 65
|
18 | 60
|
? | ? | ? |
rawId |
65
|
18 | 60
|
? | ? | ? |
response |
65
|
18 | 60
|
? | ? | ? |
getClientExtensionResults |
65
|
18 | 60
|
? | ? | ? |
isUserVerifyingPlatformAuthenticatorAvailable |
65
|
18 | 60
|
? | ? | ? |
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