API Web Authentication
Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Gli integratori devono implementare un host web per reindirizzare gli utenti ai fini dell'autenticazione. Questa è una modalità diversa, ma lo stesso scopo dell'autenticazione fornita dall'autenticazione Android.
Questo host web deve avere un sito web ottimizzato per i dispositivi mobili.
L'host web deve determinare le richieste di web mobile rispetto a quelle web desktop in base al valore dell'intestazione user-agent. La pagina pubblicata nelle richieste web mobile deve essere
ottimizzata per il web mobile su Android e iOS. Oltre al valore dell'intestazione dello user agent, il client non fornirà altri indizi sull'ambiente in cui l'utente esegue la richiesta (desktop o web).
Il server deve implementare un protocollo HTTPS utilizzando GET. Percorso e host sono
definibili dall'integratore. L'integratore deve supportare lunghezze degli URL di 2048
caratteri. Sono inclusi schema, host, porta, percorso e parametri.
Tutti i parametri utilizzano la codifica UTF-8 prima di essere codificati nell'URL.
Richiesta
Su richiesta, Google fornisce i seguenti parametri URL:
Campi |
gspMajorVersion
|
int
Numero di versione principale di questa richiesta.
|
gspAuthenticationRequest
|
AuthenticationRequest
Richiesta di autenticazione.
|
gspAssociationId
|
string
Se presente, contiene un identificatore utilizzato dall'integratore per cercare le credenziali dell'utente richiesto. Se non è presente,
l'utente ha la possibilità di modificare l'identificazione dell'account.
|
gspCallbackUrl
|
string
URL a cui reindirizzare l'utente per completare il flusso di autenticazione su Google. Questo valore è codificato nell'URL.
|
Risposta
Al termine dell'autenticazione, l'utente deve essere reindirizzato a gspCallbackUrl
utilizzando HTTPS GET. Questo URL deve avere i seguenti
parametri di query:
Campi |
gspResult
|
int
100
|
Autenticazione riuscita.
|
201
|
L'utente ha annullato il flusso manualmente e il flusso dovrebbe essere interrotto.
|
202
|
L'autenticazione non è riuscita per un motivo irreversibile e il flusso dovrebbe essere interrotto.
|
|
gspAuthenticationResponse
|
AuthenticationResponse
Risposta di autenticazione.
|
Tutti i diritti riservati. Java è un marchio registrato di Oracle e/o delle sue consociate.
Ultimo aggiornamento 2025-07-25 UTC.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Mancano le informazioni di cui ho bisogno","missingTheInformationINeed","thumb-down"],["Troppo complicato/troppi passaggi","tooComplicatedTooManySteps","thumb-down"],["Obsoleti","outOfDate","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Problema relativo a esempi/codice","samplesCodeIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 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"]]