public static class IdentityPoolCredentials.Builder extends ExternalAccountCredentials.Builder
audience, clientId, clientSecret, connectTimeout, credentialSource, environmentProvider, metricsHandler, readTimeout, scopes, serviceAccountImpersonationOptions, serviceAccountImpersonationUrl, subjectTokenType, tokenInfoUrl, tokenUrl, transportFactory, universeDomain, workforcePoolUserProjectquotaProjectId| Modifier and Type | Method and Description |
|---|---|
IdentityPoolCredentials |
build() |
IdentityPoolCredentials.Builder |
setAudience(String audience)
Sets the Security Token Service audience, which is usually the fully specified resource name
of the workload/workforce pool provider.
|
IdentityPoolCredentials.Builder |
setClientId(String clientId)
Sets the optional client ID of the service account from the console.
|
IdentityPoolCredentials.Builder |
setClientSecret(String clientSecret)
Sets the optional client secret of the service account from the console.
|
IdentityPoolCredentials.Builder |
setCredentialSource(IdentityPoolCredentialSource credentialSource) |
IdentityPoolCredentials.Builder |
setHttpTransportFactory(HttpTransportFactory transportFactory)
Sets the HTTP transport factory, creates the transport used to get access tokens.
|
IdentityPoolCredentials.Builder |
setQuotaProjectId(String quotaProjectId)
Sets the optional project used for quota and billing purposes.
|
IdentityPoolCredentials.Builder |
setScopes(Collection<String> scopes)
Sets the optional scopes to request during the authorization grant.
|
IdentityPoolCredentials.Builder |
setServiceAccountImpersonationOptions(Map<String,Object> optionsMap)
Sets the optional service account impersonation options.
|
IdentityPoolCredentials.Builder |
setServiceAccountImpersonationUrl(String serviceAccountImpersonationUrl)
Sets the optional URL used for service account impersonation, which is required for some
APIs.
|
IdentityPoolCredentials.Builder |
setSubjectTokenSupplier(IdentityPoolSubjectTokenSupplier subjectTokenSupplier)
Sets the subject token supplier.
|
IdentityPoolCredentials.Builder |
setSubjectTokenType(ExternalAccountCredentials.SubjectTokenTypes subjectTokenType)
Sets the Security Token Service subject token type based on the OAuth 2.0 token exchange
spec.
|
IdentityPoolCredentials.Builder |
setSubjectTokenType(String subjectTokenType)
Sets the Security Token Service subject token type based on the OAuth 2.0 token exchange
spec.
|
IdentityPoolCredentials.Builder |
setTokenInfoUrl(String tokenInfoUrl)
Sets the optional endpoint used to retrieve account related information.
|
IdentityPoolCredentials.Builder |
setTokenUrl(String tokenUrl)
Sets the Security Token Service token exchange endpoint.
|
IdentityPoolCredentials.Builder |
setUniverseDomain(String universeDomain)
Sets the optional universe domain.
|
IdentityPoolCredentials.Builder |
setWorkforcePoolUserProject(String workforcePoolUserProject)
Sets the optional workforce pool user project number when the credential corresponds to a
workforce pool and not a workload identity pool.
|
setConnectTimeout, setCredentialSource, setReadTimeoutgetQuotaProjectId, getUniverseDomain, setAccessTokengetAccessToken, getExpirationMargin, getRefreshMargin, setExpirationMargin, setRefreshMargin@CanIgnoreReturnValue public IdentityPoolCredentials.Builder setSubjectTokenSupplier(IdentityPoolSubjectTokenSupplier subjectTokenSupplier)
subjectTokenSupplier - the supplier to use.Builder object@CanIgnoreReturnValue public IdentityPoolCredentials.Builder setHttpTransportFactory(HttpTransportFactory transportFactory)
ExternalAccountCredentials.BuildersetHttpTransportFactory in class ExternalAccountCredentials.BuildertransportFactory - the HttpTransportFactory to setBuilder object@CanIgnoreReturnValue public IdentityPoolCredentials.Builder setAudience(String audience)
ExternalAccountCredentials.BuildersetAudience in class ExternalAccountCredentials.Builderaudience - the Security Token Service audience to setBuilder object@CanIgnoreReturnValue public IdentityPoolCredentials.Builder setSubjectTokenType(String subjectTokenType)
ExternalAccountCredentials.BuildersetSubjectTokenType in class ExternalAccountCredentials.BuildersubjectTokenType - the Security Token Service subject token type to setBuilder object@CanIgnoreReturnValue public IdentityPoolCredentials.Builder setSubjectTokenType(ExternalAccountCredentials.SubjectTokenTypes subjectTokenType)
ExternalAccountCredentials.BuildersetSubjectTokenType in class ExternalAccountCredentials.BuildersubjectTokenType - the SubjectTokenType to setBuilder object@CanIgnoreReturnValue public IdentityPoolCredentials.Builder setTokenUrl(String tokenUrl)
ExternalAccountCredentials.BuildersetTokenUrl in class ExternalAccountCredentials.BuildertokenUrl - the Security Token Service token exchange url to setBuilder object@CanIgnoreReturnValue public IdentityPoolCredentials.Builder setCredentialSource(IdentityPoolCredentialSource credentialSource)
@CanIgnoreReturnValue public IdentityPoolCredentials.Builder setServiceAccountImpersonationUrl(String serviceAccountImpersonationUrl)
ExternalAccountCredentials.BuildersetServiceAccountImpersonationUrl in class ExternalAccountCredentials.BuilderserviceAccountImpersonationUrl - the service account impersonation url to setBuilder object@CanIgnoreReturnValue public IdentityPoolCredentials.Builder setTokenInfoUrl(String tokenInfoUrl)
ExternalAccountCredentials.BuildersetTokenInfoUrl in class ExternalAccountCredentials.BuildertokenInfoUrl - the token info url to setBuilder object@CanIgnoreReturnValue public IdentityPoolCredentials.Builder setQuotaProjectId(String quotaProjectId)
ExternalAccountCredentials.BuildersetQuotaProjectId in class ExternalAccountCredentials.BuilderquotaProjectId - the quota and billing project id to setBuilder object@CanIgnoreReturnValue public IdentityPoolCredentials.Builder setClientId(String clientId)
ExternalAccountCredentials.BuildersetClientId in class ExternalAccountCredentials.BuilderclientId - the service account client id to setBuilder object@CanIgnoreReturnValue public IdentityPoolCredentials.Builder setClientSecret(String clientSecret)
ExternalAccountCredentials.BuildersetClientSecret in class ExternalAccountCredentials.BuilderclientSecret - the service account client secret to setBuilder object@CanIgnoreReturnValue public IdentityPoolCredentials.Builder setScopes(Collection<String> scopes)
ExternalAccountCredentials.BuildersetScopes in class ExternalAccountCredentials.Builderscopes - the request scopes to setBuilder object@CanIgnoreReturnValue public IdentityPoolCredentials.Builder setWorkforcePoolUserProject(String workforcePoolUserProject)
ExternalAccountCredentials.BuildersetWorkforcePoolUserProject in class ExternalAccountCredentials.BuilderworkforcePoolUserProject - the workforce pool user project number to setBuilder object@CanIgnoreReturnValue public IdentityPoolCredentials.Builder setServiceAccountImpersonationOptions(Map<String,Object> optionsMap)
ExternalAccountCredentials.BuildersetServiceAccountImpersonationOptions in class ExternalAccountCredentials.BuilderoptionsMap - the service account impersonation options to setBuilder object@CanIgnoreReturnValue public IdentityPoolCredentials.Builder setUniverseDomain(String universeDomain)
ExternalAccountCredentials.BuildersetUniverseDomain in class ExternalAccountCredentials.BuilderuniverseDomain - the universe domain to setBuilder objectpublic IdentityPoolCredentials build()
build in class ExternalAccountCredentials.BuilderCopyright © 2026 Google. All rights reserved.