GetSignInWithGoogleOption

public final class GetSignInWithGoogleOption extends 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

Konstruktory publiczne

GetSignInWithGoogleOption(
    @NonNull String serverClientId,
    String hostedDomainFilter,
    String nonce
)

Metody publiczne

static final @NonNull GetSignInWithGoogleOption

Funkcja pomocnicza do tworzenia zbioru GetSignInWithGoogleOption z danego pakietu.

final String

filtr domen hostowanych (np. myuniveristy.edu),

final String

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

final @NonNull String

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

Konstruktory publiczne

GetSignInWithGoogleOption

public GetSignInWithGoogleOption(
    @NonNull String serverClientId,
    String hostedDomainFilter,
    String nonce
)

Metody publiczne

createFrom

public static final @NonNull GetSignInWithGoogleOption createFrom(@NonNull Bundle data)

Funkcja pomocnicza do tworzenia zbioru GetSignInWithGoogleOption z danego pakietu.

Parametry
@NonNull Bundle data

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

getHostDomainFilter

public final String getHostedDomainFilter()

filtr domen hostowanych (np. myuniveristy.edu),

getNonce,

public final String getNonce()

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

getServerClientId

public final @NonNull String getServerClientId()

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