GetSignInWithGoogleOption

class GetSignInWithGoogleOption : GetCustomCredentialOption


żądanie pobrania tokena identyfikatora Google z wyraźnego przycisku „Zaloguj się przez Google”;

Dostawca danych logowania, który chce obsługiwać ten typ danych logowania, musi sprawdzić, czy nadchodzący GetCustomCredentialOption ma typ GoogleIdTokenCredential.TYPE_GOOGLE_ID_TOKEN_CREDENTIAL, a odpowiadające im requestData i candidateQueryData muszą mieć klucz GoogleIdTokenCredential.BUNDLE_KEY_GOOGLE_ID_TOKEN_SUBTYPE z wartością ustawioną na GoogleIdTokenCredential.TYPE_GOOGLE_ID_TOKEN_SIWG_CREDENTIAL

Narzuty
java.lang.IllegalArgumentException: java.lang.IllegalArgumentException

Jeśli pole serverClientId jest puste

com.google.android.libraries.identity.googleid.GoogleIdTokenParsingException: com.google.android.libraries.identity.googleid.GoogleIdTokenParsingException

Jeśli podczas tworzenia elementu GetSignInWithGoogleOption wystąpił błąd.

Podsumowanie

Typy zagnieżdżone

Zajęcia z budowania z GetSignInWithGoogleOption

Publiczne funkcje towarzyszące

GetSignInWithGoogleOption

Funkcja pomocnicza do tworzenia zbioru GetSignInWithGoogleOption z danego pakietu.

Konstruktory publiczne

GetSignInWithGoogleOption(
    serverClientId: String,
    hostedDomainFilter: String?,
    nonce: String?
)

Obiekty publiczne

String?

filtr domen hostowanych (np. myuniveristy.edu),

String?

liczba jednorazowa do użycia podczas generowania tokena tożsamości

String

identyfikator klienta serwera, na który zostanie wydany token identyfikatora.

Publiczne funkcje towarzyszące

createFrom

fun createFrom(data: Bundle): GetSignInWithGoogleOption

Funkcja pomocnicza do tworzenia zbioru GetSignInWithGoogleOption z danego pakietu.

Parametry
data: Bundle

Pakiet zawierający wszystkie niezbędne informacje o elemencie GetSignInWithGoogleOption.

Konstruktory publiczne

GetSignInWithGoogleOption

GetSignInWithGoogleOption(
    serverClientId: String,
    hostedDomainFilter: String? = null,
    nonce: String? = null
)

Obiekty publiczne

hostowany filtr domen

val hostedDomainFilterString?

filtr domen hostowanych (np. myuniveristy.edu),

liczba jednorazowa

val nonceString?

liczba jednorazowa do użycia podczas generowania tokena tożsamości

SerwerClientId

val serverClientIdString

identyfikator klienta serwera, na który zostanie wydany token identyfikatora.