W3cubDocs

/Web APIs

AuthenticatorAttestationResponse: getPublicKeyAlgorithm() method

Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.

The getPublicKeyAlgorithm() method of the AuthenticatorAttestationResponse interface returns a number that is equal to a COSE Algorithm Identifier, representing the cryptographic algorithm used for the new credential.

This is a convenience function created to allow easy access to the algorithm type. This information will need to be stored in order to verify future authentication operations (i.e., using navigator.credentials.get()).

Syntax

js

getPublicKeyAlgorithm()

Parameters

None.

Return value

A number that is equal to a COSE Algorithm Identifier, representing the cryptographic algorithm used for the new credential.

Examples

Specifications

Browser compatibility

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari WebView Android Chrome Android Firefox for Android Opera Android Safari on IOS Samsung Internet
getPublicKeyAlgorithm 85 85 119 No 71 16 No 85 119 60 16 14.0

© 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/AuthenticatorAttestationResponse/getPublicKeyAlgorithm