ウェブ認証 API
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
インテグレータは、認証目的でユーザーをリダイレクトするウェブホストを実装する必要があります。この認証は別のモダリティですが、Android 認証で提供される認証と同じ目的です。このウェブホストには、モバイル対応のウェブサイトが必要です。
ウェブホストは、ユーザー エージェント ヘッダー値に基づいて、モバイルウェブ リクエストと PC ウェブ リクエストを判断する必要があります。モバイルウェブ リクエストに配信されるページは、Android および iOS のモバイルウェブ対応である必要があります。クライアントは、user-agent ヘッダー値の他に、ユーザーがリクエストを行っている環境(パソコンまたはウェブ)に関する他のヒントを提供しません。
サーバーは GET を使用して HTTPS プロトコルを実装する必要があります。パスとホストはインテグレータが定義できます。インテグレータは 2,048 文字の URL の長さをサポートする必要があります。これには、スキーム、ホスト、ポート、パス、パラメータが含まれます。
パラメータはすべて、URL エンコードの前に UTF-8 でエンコードされます。
リクエスト
リクエストに応じて Google は URL パラメータとして以下を提供します。
フィールド |
gspMajorVersion
|
int
このリクエストのメジャー バージョン番号。 |
gspAuthenticationRequest
|
AuthenticationRequest
認証リクエスト。 |
gspAssociationId
|
string
存在する場合、インテグレータがチャレンジ対象のユーザーの認証情報を検索する際に使用する識別子が含まれます。このフィールドが存在しない場合、ユーザーはアカウント ID を変更できます。
|
gspCallbackUrl
|
string
Google で認証フローを完了するためにユーザーをリダイレクトする URL。この値は URL エンコードされます。
|
レスポンス
認証が完了したら、HTTPS GET を使用して gspCallbackUrl
にリダイレクトする必要があります。この URL には、次のクエリ パラメータが必要です。
フィールド |
gspResult
|
int
100
|
認証に成功しました。
|
201
|
ユーザーが手動でフローをキャンセルしたため、フローを中止する必要があります。
|
202
|
致命的な理由で認証に失敗したため、フローを中止する必要があります。 |
|
gspAuthenticationResponse
|
AuthenticationResponse
認証レスポンス。 |
All rights reserved. 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。"],[[["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"]]