AuthenticatorAttestationResponse: phương thức getPublicKeyAlgorithm()
Baseline
2023
Newly available
Since October 2023, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.
Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.
Phương thức getPublicKeyAlgorithm() của giao diện AuthenticatorAttestationResponse trả về một số bằng với một COSE Algorithm Identifier, biểu thị thuật toán mật mã được dùng cho thông tin xác thực mới.
Đây là một hàm tiện ích được tạo ra để cho phép truy cập dễ dàng vào kiểu thuật toán. Thông tin này sẽ cần được lưu lại để xác minh các thao tác xác thực trong tương lai (tức là dùng navigator.credentials.get()).
Cú pháp
getPublicKeyAlgorithm()
Tham số
Không có.
Giá trị trả về
Một số bằng với một COSE Algorithm Identifier, biểu thị thuật toán mật mã được dùng cho thông tin xác thực mới.
Ví dụ
Xem Creating a public key credential để có ví dụ chi tiết.
Thông số kỹ thuật
| Thông số kỹ thuật |
|---|
| Web Authentication: An API for accessing Public Key Credentials - Level 3> # dom-authenticatorattestationresponse-getpublickeyalgorithm> |