Method: challenge.verify
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
HTTP 要求
POST https://verifiedaccess.googleapis.com/v1/challenge:verify
這個網址使用 gRPC 轉碼語法。
要求主體
要求主體的資料會採用以下結構:
JSON 表示法 |
{
"challengeResponse": {
object (SignedData )
},
"expectedIdentity": string
} |
欄位 |
challengeResponse |
object (SignedData )
系統產生的挑戰回應
|
expectedIdentity |
string
服務可選擇提供與金鑰相關聯的裝置或使用者身分資訊。對於 EMK,這個值是註冊的網域。如果是 EUK,這個值就是使用者的電子郵件地址。如果有這個值,系統會將這個值與回應內容進行比對,如果不相符,驗證就會失敗。
|
回應主體
VerifiedAccess.VerifyChallengeResponse 的結果訊息。
如果成功,回應主體會含有以下結構的資料:
JSON 表示法 |
{
"verificationOutput": string,
"devicePermanentId": string,
"signedPublicKeyAndChallenge": string,
"deviceEnrollmentId": string,
"attestedDeviceId": string
} |
欄位 |
verificationOutput (deprecated) |
string
針對 EMCert 檢查,裝置永久 ID 會傳回至此。針對 EUCert 檢查,如果有 signedPublicKeyAndChallenge [base64 編碼],系統會傳回該值,否則會傳回空白字串。這個欄位已淘汰,請改用 devicePermanentId 或 signedPublicKeyAndChallenge 欄位。
|
devicePermanentId |
string
裝置永久 ID 會傳回至這個欄位 (僅限機器人回應)。
|
signedPublicKeyAndChallenge |
string
這個欄位會傳回憑證簽署要求 (採用 SPKAC 格式,以 base64 編碼)。只有在裝置在挑戰回應中加入 CSR 時,系統才會設定這個欄位。(現在可為使用者和機器回應選取是否要加入 CSR)
|
deviceEnrollmentId |
string
裝置註冊 ID 會傳回至這個欄位 (僅限機器回應)。
|
attestedDeviceId |
string
裝置的已驗證裝置 ID (ADID),讀取自驗證資料。
|
授權範圍
需要下列 OAuth 範圍:
https://www.googleapis.com/auth/verifiedaccess
詳情請參閱 OAuth 2.0 Overview。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-25 (世界標準時間)。
[null,null,["上次更新時間:2025-07-25 (世界標準時間)。"],[[["\u003cp\u003eThe challenge.verify API is used to verify a challenge response from a device or user, typically involving cryptographic signatures.\u003c/p\u003e\n"],["\u003cp\u003eThe request body requires the challenge response and optionally the expected identity of the device or user.\u003c/p\u003e\n"],["\u003cp\u003eUpon successful verification, the response body provides device identifiers, a certificate signing request (if applicable), and other relevant data.\u003c/p\u003e\n"],["\u003cp\u003eThis API requires the \u003ccode\u003ehttps://www.googleapis.com/auth/verifiedaccess\u003c/code\u003e OAuth scope for authorization.\u003c/p\u003e\n"]]],[],null,["# Method: challenge.verify\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n - [JSON representation](#body.VerifyChallengeResponseResult.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n\nchallenge.verify API\n\n### HTTP request\n\n`POST https://verifiedaccess.googleapis.com/v1/challenge:verify`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation |\n|--------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"challengeResponse\": { object (/chrome/verified-access/reference/rest/v1/SignedData) }, \"expectedIdentity\": string } ``` |\n\n| Fields ||\n|---------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `challengeResponse` | `object (`[SignedData](/chrome/verified-access/reference/rest/v1/SignedData)`)` The generated response to the challenge |\n| `expectedIdentity` | `string` Service can optionally provide identity information about the device or user associated with the key. For an EMK, this value is the enrolled domain. For an EUK, this value is the user's email address. If present, this value will be checked against contents of the response, and verification will fail if there is no match. |\n\n### Response body\n\nResult message for VerifiedAccess.VerifyChallengeResponse.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"verificationOutput\": string, \"devicePermanentId\": string, \"signedPublicKeyAndChallenge\": string, \"deviceEnrollmentId\": string, \"attestedDeviceId\": string } ``` |\n\n| Fields ||\n|---------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `verificationOutput` **(deprecated)** | `string` | This item is deprecated! For EMCert check, device permanent id is returned here. For EUCert check, signedPublicKeyAndChallenge \\[base64 encoded\\] is returned if present, otherwise empty string is returned. This field is deprecated, please use devicePermanentId or signedPublicKeyAndChallenge fields. |\n| `devicePermanentId` | `string` Device permanent id is returned in this field (for the machine response only). |\n| `signedPublicKeyAndChallenge` | `string` Certificate Signing Request (in the SPKAC format, base64 encoded) is returned in this field. This field will be set only if device has included CSR in its challenge response. (the option to include CSR is now available for both user and machine responses) |\n| `deviceEnrollmentId` | `string` Device enrollment id is returned in this field (for the machine response only). |\n| `attestedDeviceId` | `string` Attested device id (ADID) of the device, read from the verified data. |\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/verifiedaccess`\n\nFor more information, see the [OAuth 2.0 Overview](/identity/protocols/OAuth2)."]]