Web Authentication API
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
集成商必须实现网站主机来重定向用户,以便进行身份验证。此身份验证是不同的模态,但用途与 Android 身份验证提供的身份验证用途相同。此网站托管服务商必须有一个适合移动设备的网站。
Web 主机必须根据用户代理标头值确定移动网络请求与桌面 Web 请求。通过移动网络请求传送的网页必须在 Android 和 iOS 设备上适合在移动网络上投放。除了用户代理标头值之外,客户端不会就用户发出请求的环境(桌面或网络)提供其他提示。
服务器必须使用 GET 实现 HTTPS 协议。路径和主机由集成商定义。集成商必须支持的网址长度为 2,048 个字符。这包括架构、主机、端口、路径和参数。
所有参数在进行网址编码之前都会先经过 UTF-8 编码。
请求
Google 会根据您的请求提供以下网址作为网址参数:
字段 |
gspMajorVersion
|
int
此请求的主要版本号。
|
gspAuthenticationRequest
|
AuthenticationRequest
身份验证请求。
|
gspAssociationId
|
string
如果存在,则其中包含一个标识符,集成商可以使用该标识符为需要验证的用户查找凭据。如果没有此项,用户可以选择更改帐号标识。
|
gspCallbackUrl
|
string
用户为了在 Google 上完成身份验证流程而重定向到的网址。此值经过网址编码。
|
响应
完成身份验证后,必须使用 HTTPS GET 将用户重定向到 gspCallbackUrl
。此网址必须具有以下查询参数:
字段 |
gspResult
|
int
100
|
身份验证成功。
|
201
|
用户手动取消了该流程,并且应取消该流程。
|
202
|
身份验证因严重原因而失败,应取消该流程。
|
|
gspAuthenticationResponse
|
AuthenticationResponse
身份验证响应。
|
保留所有权利。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[[["易于理解","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"]],["最后更新时间 (UTC):2025-07-25。"],[[["Integrators must implement a mobile-friendly web host to redirect users for authentication, similar to Android authentication but utilizing a web-based approach."],["The web host should distinguish between mobile and desktop requests using the user-agent header and deliver a mobile-friendly experience for both Android and iOS."],["The server must use HTTPS GET with a definable path and host, supporting URLs up to 2,048 characters, including parameters encoded in UTF-8 before URL encoding."],["Google provides URL parameters for the request including version, authentication request, association ID (for credential lookup), and a callback URL for redirection after authentication."],["Upon authentication completion, the user is redirected to the provided callback URL with parameters indicating the result (success, cancellation, or failure) and an authentication response."]]],["Integrators must host a mobile-friendly website for user authentication, distinguishing between mobile and desktop requests via the user-agent header. The server must utilize HTTPS GET, with a definable path and host, supporting URLs up to 2,048 characters. Google provides parameters like `gspMajorVersion`, `gspAuthenticationRequest`, `gspAssociationId`, and `gspCallbackUrl` within the request. Upon authentication completion, the user is redirected to `gspCallbackUrl` via HTTPS GET, including `gspResult` and `gspAuthenticationResponse` parameters. All parameters are UTF-8 and URL-encoded.\n"]]