GetGoogleIdOption

public final class GetGoogleIdOption extends GetCustomCredentialOption


要求擷取使用者的 Google ID 權杖。

摘要

巢狀型別

public final class GetGoogleIdOption.Builder

GetGoogleIdOption 的建構工具。

公用建構函式

GetGoogleIdOption(
    @NonNull String serverClientId,
    String nonce,
    boolean filterByAuthorizedAccounts,
    String linkedServiceId,
    List<@NonNull String> idTokenDepositionScopes,
    boolean requestVerifiedPhoneNumber,
    boolean autoSelectEnabled,
    List<@NonNull Claim> claims,
    String hostedDomainFilter
)

公用方法

static final @NonNull GetGoogleIdOption

輔助函式,可根據指定 Bundle 建立 GetGoogleIdOption。

final boolean

在要求中設定自動選取行為。註冊。

final List<@NonNull Claim>
final boolean

是否只允許使用者從已授權登入您應用程式的 Google 帳戶中選取,預設值為 true

final String

要篩選的網域 (例如 "example.com")

final List<@NonNull String>

Google 需要的 OAuth 範圍,才能將 Google ID 權杖存入應用程式的後端伺服器。

final String

將帳戶連結至 Google 帳戶時使用的服務 ID

final String

在產生 ID 權杖時使用的隨機值

final boolean

是否要在註冊時要求提供已驗證的電話號碼。

final @NonNull String

要核發 ID 權杖的伺服器用戶端 ID

公用建構函式

GetGoogleIdOption

public GetGoogleIdOption(
    @NonNull String serverClientId,
    String nonce,
    boolean filterByAuthorizedAccounts,
    String linkedServiceId,
    List<@NonNull String> idTokenDepositionScopes,
    boolean requestVerifiedPhoneNumber,
    boolean autoSelectEnabled,
    List<@NonNull Claim> claims,
    String hostedDomainFilter
)

公用方法

createFrom

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

輔助函式,可根據指定 Bundle 建立 GetGoogleIdOption。

參數
@NonNull Bundle data

包含 GetGoogleIdOption 所有必要資訊的組合。

getAutoSelectEnabled

public final boolean getAutoSelectEnabled()

在要求中設定自動選取行為。註冊。

getClaims

public final List<@NonNull ClaimgetClaims()

getFilterByAuthorizedAccounts

public final boolean getFilterByAuthorizedAccounts()

是否只允許使用者從已授權登入您應用程式的 Google 帳戶中選取,預設值為 true

getHostedDomainFilter

public final String getHostedDomainFilter()

要篩選的網域 (例如 "example.com")

getIdTokenDepositionScopes

public final List<@NonNull StringgetIdTokenDepositionScopes()

Google 需要的 OAuth 範圍,才能將 Google ID 權杖存入應用程式的後端伺服器。這項設定為選用項目,可以設為空值。只有在 Google 要求特定範圍才能存入 ID 權杖時,才需要提供這項資訊。

getLinkedServiceId

public final String getLinkedServiceId()

將帳戶連結至 Google 帳戶時使用的服務 ID

getNonce

public final String getNonce()

在產生 ID 權杖時使用的隨機值

getRequestVerifiedPhoneNumber

public final boolean getRequestVerifiedPhoneNumber()

是否要在註冊時要求提供已驗證的電話號碼。

getServerClientId

public final @NonNull String getServerClientId()

要核發 ID 權杖的伺服器用戶端 ID