Permissions-Policy: otp-credentials 指令
HTTP Permissions-Policy 頭部中的 otp-credentials 指令控制當前文件是否允許使用 WebOTP API 從應用程式伺服器傳送的特殊格式簡訊中請求一次性密碼 (OTP),即透過 navigator.credentials.get({otp: ..., ...})。
具體來說,如果定義的策略阻止使用此功能,則由 navigator.credentials.get({otp}) 返回的 Promise 將因 SecurityError DOMException 而被拒絕。
語法
http
Permissions-Policy: otp-credentials=<allowlist>;
<allowlist>-
被授予使用此功能許可權的源列表。有關更多詳細資訊,請參閱
Permissions-Policy> 語法。
預設策略
otp-credentials 的預設允許列表是 self。
規範
| 規範 |
|---|
| WebOTP API # sctn-permissions-policy |
瀏覽器相容性
載入中…