Permissions-Policy: chỉ thị publickey-credentials-get
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
Chỉ thị publickey-credentials-get của header HTTP Permissions-Policy kiểm soát việc tài liệu hiện tại có được phép truy cập Web Authentication API để truy xuất thông tin xác thực khóa công khai, tức là thông qua navigator.credentials.get({publicKey}) hay không.
Cụ thể, khi một chính sách đã được xác định chặn việc sử dụng tính năng này, Promise được trả về bởi navigator.credentials.get({publicKey}) sẽ bị từ chối với NotAllowedError DOMException.
Cú pháp
Permissions-Policy: publickey-credentials-get=<allowlist>;
<allowlist>-
Danh sách các nguồn gốc được cấp quyền sử dụng tính năng. Xem
Permissions-Policy> Cú pháp để biết thêm chi tiết.
Chính sách mặc định
Danh sách cho phép mặc định cho publickey-credentials-get là self.
Thông số kỹ thuật
| Specification |
|---|
| Web Authentication: An API for accessing Public Key Credentials - Level 3> # sctn-permissions-policy> |
Tương thích trình duyệt
Xem thêm
- Header
Permissions-Policy - Permissions Policy
- Web Authentication API
- Giao diện
PublicKeyCredential