ออบเจ็กต์: AuthenticationResponse
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
เนื้อหาการตอบกลับ
ออบเจ็กต์ที่ส่งในระหว่างการตอบกลับการตรวจสอบสิทธิ์
ต่อไปนี้คือตัวอย่างการตอบกลับ JSON แบบข้อความธรรมดา
{
"associationId": "88ydEE-ioiwe==",
"requestId": "375dhjf9-Uydd="
}
AuthenticationResponse
ได้รับการเข้ารหัสและลงนามโดยใช้ PGP หรือ JWE+JWS
นอกจากนี้ ค่านี้ยังเข้ารหัส Web-safe base64 ด้วย การเข้ารหัสนี้เรียกต่อไปนี้ว่า
Base64UrlEncode
กล่าวคือ AuthenticationRequest
เวอร์ชัน JSON แบบข้อความที่ชัดเจนต้องส่งผ่านฟังก์ชันต่อไปนี้
Base64UrlEncode(
PGPSignAndEncrypt(
'{"associationId": "88ydEE-ioiwe==", "requestId": "375dhjf9-Uydd="}'
)
)
หรือ
Base64UrlEncode(
JWSignAndEncrypt(
'{"associationId": "88ydEE-ioiwe==", "requestId": "375dhjf9-Uydd="}'
)
)
การแสดง JSON |
{
"associationId": string,
"requestId": string,
"authenticationResult": {
object (AuthenticationResult ) }
}
|
ช่อง |
associationId |
string
แสดงให้ Google เป็นผู้รวบรวมการชำระเงิน วิธีนี้ช่วยให้ Google ตรวจสอบได้ว่า associationId ที่ส่งกลับเป็น gspAssociationId เดียวกันกับที่ส่งเข้ามา
โดยต้องระบุหากมีในคำขอ
|
requestId |
string
ต้องระบุ: แสดงผลกลับไปยัง Google โดยผู้ผสานรวมการชำระเงิน วิธีนี้ช่วยให้ Google ป้องกันการโจมตีซ้ำได้
|
authenticationResult |
object (AuthenticationResult )
ผลของการตรวจสอบสิทธิ์ สำหรับขั้นตอนที่ไม่มีการเรียกใช้เครื่องมือผสานรวมการชำระเงินในภายหลังหลังจากการตรวจสอบสิทธิ์แล้ว ผลลัพธ์ต้องรวมอยู่ในการตอบกลับเพื่อให้แน่ใจว่าผลลัพธ์มีความสมบูรณ์
|
AuthenticationResult
การแสดง JSON |
{
// Union field result can be only one of the following:
"success": {
object (Empty )
},
"cancelled": {
object (Empty )
},
"fatalError": {
object (Empty )
}
// End of list of possible types for union field result .
}
|
ช่อง |
ฟิลด์สหภาพ result result ต้องเป็นค่าใดค่าหนึ่งต่อไปนี้
|
success |
object (Empty )
การตรวจสอบสิทธิ์สำเร็จแล้ว
|
cancelled |
object (Empty )
ผู้ใช้ยกเลิกขั้นตอนด้วยตนเองและควรยกเลิกขั้นตอน
|
fatalError |
object (Empty )
การตรวจสอบสิทธิ์ไม่สำเร็จเนื่องจากเหตุผลร้ายแรงและควรยกเลิกขั้นตอน
|
สงวนลิขสิทธิ์ Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-25 UTC
[[["เข้าใจง่าย","easyToUnderstand","thumb-up"],["แก้ปัญหาของฉันได้","solvedMyProblem","thumb-up"],["อื่นๆ","otherUp","thumb-up"]],[["ไม่มีข้อมูลที่ฉันต้องการ","missingTheInformationINeed","thumb-down"],["ซับซ้อนเกินไป/มีหลายขั้นตอนมากเกินไป","tooComplicatedTooManySteps","thumb-down"],["ล้าสมัย","outOfDate","thumb-down"],["ปัญหาเกี่ยวกับการแปล","translationIssue","thumb-down"],["ตัวอย่าง/ปัญหาเกี่ยวกับโค้ด","samplesCodeIssue","thumb-down"],["อื่นๆ","otherDown","thumb-down"]],["อัปเดตล่าสุด 2025-07-25 UTC"],[[["The `AuthenticationResponse` object, sent during authentication, contains `associationId`, `requestId`, and `authenticationResult`."],["This object is encrypted, signed (using PGP or JWE+JWS), and encoded with web-safe base64."],["`authenticationResult` indicates the outcome: `success`, `cancelled`, or `fatalError`."],["`associationId` and `requestId` are used for validation and preventing replay attacks, respectively."]]],["The authentication response, a JSON object, must be encrypted (PGP or JWE+JWS) and web-safe base64 encoded (`Base64UrlEncode`). It includes `associationId` (a reflected identifier), and a required `requestId` (to prevent replay attacks). Additionally, `authenticationResult` indicates success, user cancellation, or fatal error. The clear text version, like `{\"associationId\": \"...\", \"requestId\": \"...\"}`, is signed, encrypted and then encoded as indicated. `associationId` must be present in the response if it was in the request.\n"]]