GetSignInWithGoogleOption

public final class GetSignInWithGoogleOption extends GetCustomCredentialOption


'Google से साइन इन करें' बटन का इस्तेमाल करके, उपयोगकर्ता का Google आईडी टोकन पाने का अनुरोध.

इस तरह का क्रेडेंशियल देने की इच्छा रखने वाले क्रेडेंशियल देने वाले को, यह जांच करनी होगी कि आने वाले GetCustomCredentialOption का टाइप GoogleIdTokenCredential.TYPE_GOOGLE_ID_TOKEN_CREDENTIAL है या नहीं. साथ ही, इससे जुड़े requestData और candidateQueryData में GoogleIdTokenCredential.TYPE_GOOGLE_ID_TOKEN_SIWG_CREDENTIAL की वैल्यू के साथ GoogleIdTokenCredential.BUNDLE_KEY_GOOGLE_ID_TOKEN_SUBTYPE कुंजी होनी चाहिए या नहीं

थ्रो
java.lang.IllegalArgumentException java.lang.IllegalArgumentException

अगर serverClientId खाली है

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

अगर बंडल से GetSignInWithGoogleOption को बनाने में कोई गड़बड़ी सामने आई हो.

खास जानकारी

नेस्ट किए गए प्रकार

GetSignInWithGoogleOption के लिए बिल्डर क्लास

सार्वजनिक कंस्ट्रक्टर

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

सार्वजनिक तरीके

static final @NonNull GetSignInWithGoogleOption

दिए गए बंडल में से GetSignInWithGoogleOption बनाने के लिए सहायक फ़ंक्शन.

final String

होस्ट किए गए डोमेन का फ़िल्टर (जैसे myuniveristy.edu)

final String

आईडी टोकन जनरेट करने के दौरान इस्तेमाल करने के लिए नॉन्स

final @NonNull String

उस सर्वर का क्लाइंट आईडी जिस पर आईडी टोकन जारी किया जाएगा

इनहेरिट किए गए तरीके

androidx.credentials.CredentialOption से

सार्वजनिक कंस्ट्रक्टर

GetSignInWithGoogleOption

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

सार्वजनिक तरीके

createFrom

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

दिए गए बंडल में से GetSignInWithGoogleOption बनाने के लिए सहायक फ़ंक्शन.

पैरामीटर
@NonNull Bundle data

वह बंडल जिसमें GetSignInWithGoogleOption के बारे में सभी ज़रूरी जानकारी मौजूद है.

getHostedDomainFilter

public final String getHostedDomainFilter()

होस्ट किए गए डोमेन का फ़िल्टर (जैसे myuniveristy.edu)

getNonce

public final String getNonce()

आईडी टोकन जनरेट करने के दौरान इस्तेमाल करने के लिए नॉन्स

getServerClientId

public final @NonNull String getServerClientId()

उस सर्वर का क्लाइंट आईडी जिस पर आईडी टोकन जारी किया जाएगा