GetSignInWithGoogleOption

public final class GetSignInWithGoogleOption extends GetCustomCredentialOption


Żądanie pobrania tokena identyfikatora Google użytkownika za pomocą przycisku „Zaloguj się przez Google”.

Dostawca danych uwierzytelniających, który chce udostępniać ten typ danych logowania, musi sprawdzić, czy przychodzący GetCustomCredentialOption ma typ GoogleIdTokenCredential.TYPE_GOOGLE_ID_TOKEN_CREDENTIAL, a odpowiednie requestData i candidateQueryData muszą mieć klucz GoogleIdTokenCredential.BUNDLE_KEY_GOOGLE_ID_TOKEN_SUBTYPE z wartością ustawioną jako GoogleIdTokenCredential.TYPE_GOOGLE_ID_TOKEN_SIWG_CREDENTIAL

Rzuty
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 GetSignInWithGoogleOption z pakietu wystąpił błąd.

Podsumowanie

Zagnieżdżone typy

Klasa konstruktora dla projektu GetSignInWithGoogleOption

Konstruktory publiczne

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

Metody publiczne

static final @NonNull GetSignInWithGoogleOption

Funkcja pomocnicza do tworzenia GetSignInWithGoogleOption z danego pakietu.

final String

filtr domen hostowanych (np. myuniveristy.edu)

final String

liczba jednorazowa do użycia podczas generowania tokena identyfikatora

final @NonNull String

identyfikator klienta serwera, dla którego zostanie wystawiony 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 GetSignInWithGoogleOption z danego pakietu.

Parametry
@NonNull Bundle data

Pakiet zawierający wszystkie niezbędne informacje na temat elementu GetSignInWithGoogleOption.

getHostedDomainFilter

public final String getHostedDomainFilter()

filtr domen hostowanych (np. myuniveristy.edu)

getNonce

public final String getNonce()

liczba jednorazowa do użycia podczas generowania tokena identyfikatora

getServerClientId

public final @NonNull String getServerClientId()

identyfikator klienta serwera, dla którego zostanie wystawiony token identyfikatora