Firefox Tomorrow

web api instance method

AuthenticatorAttestationResponse: getPublicKeyAlgorithm() method

View on MDN ↗

Secure context

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

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

See Creating a public key credential for a detailed example.

Specifications

SpecificationsStandards references are available on the canonical MDN page.

Browser compatibility

Browser compatibilityCompatibility data is available on the canonical MDN page.