public static class PluggableAuthCredentials.Builder extends ExternalAccountCredentials.Builder
Inheritance
java.lang.Object > OAuth2Credentials.Builder > GoogleCredentials.Builder > ExternalAccountCredentials.Builder > PluggableAuthCredentials.BuilderMethods
build()
public PluggableAuthCredentials build()
Returns | |
---|---|
Type | Description |
PluggableAuthCredentials |
setAudience(String audience)
public PluggableAuthCredentials.Builder setAudience(String audience)
Sets the Security Token Service audience, which is usually the fully specified resource name of the workload/workforce pool provider.
Parameter | |
---|---|
Name | Description |
audience |
String |
Returns | |
---|---|
Type | Description |
PluggableAuthCredentials.Builder |
setClientId(String clientId)
public PluggableAuthCredentials.Builder setClientId(String clientId)
Sets the optional client ID of the service account from the console.
Parameter | |
---|---|
Name | Description |
clientId |
String |
Returns | |
---|---|
Type | Description |
PluggableAuthCredentials.Builder |
setClientSecret(String clientSecret)
public PluggableAuthCredentials.Builder setClientSecret(String clientSecret)
Sets the optional client secret of the service account from the console.
Parameter | |
---|---|
Name | Description |
clientSecret |
String |
Returns | |
---|---|
Type | Description |
PluggableAuthCredentials.Builder |
setCredentialSource(PluggableAuthCredentialSource credentialSource)
public PluggableAuthCredentials.Builder setCredentialSource(PluggableAuthCredentialSource credentialSource)
Parameter | |
---|---|
Name | Description |
credentialSource |
PluggableAuthCredentialSource |
Returns | |
---|---|
Type | Description |
PluggableAuthCredentials.Builder |
setExecutableHandler(ExecutableHandler handler)
public PluggableAuthCredentials.Builder setExecutableHandler(ExecutableHandler handler)
Parameter | |
---|---|
Name | Description |
handler |
com.google.auth.oauth2.ExecutableHandler |
Returns | |
---|---|
Type | Description |
PluggableAuthCredentials.Builder |
setHttpTransportFactory(HttpTransportFactory transportFactory)
public PluggableAuthCredentials.Builder setHttpTransportFactory(HttpTransportFactory transportFactory)
Sets the HTTP transport factory, creates the transport used to get access tokens.
Parameter | |
---|---|
Name | Description |
transportFactory |
HttpTransportFactory |
Returns | |
---|---|
Type | Description |
PluggableAuthCredentials.Builder |
setQuotaProjectId(String quotaProjectId)
public PluggableAuthCredentials.Builder setQuotaProjectId(String quotaProjectId)
Sets the optional project used for quota and billing purposes.
Parameter | |
---|---|
Name | Description |
quotaProjectId |
String |
Returns | |
---|---|
Type | Description |
PluggableAuthCredentials.Builder |
setScopes(Collection<String> scopes)
public PluggableAuthCredentials.Builder setScopes(Collection<String> scopes)
Sets the optional scopes to request during the authorization grant.
Parameter | |
---|---|
Name | Description |
scopes |
Collection<String> |
Returns | |
---|---|
Type | Description |
PluggableAuthCredentials.Builder |
setServiceAccountImpersonationOptions(Map<String,Object> optionsMap)
public PluggableAuthCredentials.Builder setServiceAccountImpersonationOptions(Map<String,Object> optionsMap)
Sets the optional service account impersonation options.
Parameter | |
---|---|
Name | Description |
optionsMap |
Map<String,Object> |
Returns | |
---|---|
Type | Description |
PluggableAuthCredentials.Builder |
setServiceAccountImpersonationUrl(String serviceAccountImpersonationUrl)
public PluggableAuthCredentials.Builder setServiceAccountImpersonationUrl(String serviceAccountImpersonationUrl)
Sets the optional URL used for service account impersonation, which is required for some APIs. If this URL is not available, the access token from the Security Token Service is used directly.
Parameter | |
---|---|
Name | Description |
serviceAccountImpersonationUrl |
String |
Returns | |
---|---|
Type | Description |
PluggableAuthCredentials.Builder |
setSubjectTokenType(ExternalAccountCredentials.SubjectTokenTypes subjectTokenType)
public PluggableAuthCredentials.Builder setSubjectTokenType(ExternalAccountCredentials.SubjectTokenTypes subjectTokenType)
Sets the Security Token Service subject token type based on the OAuth 2.0 token exchange spec. Indicates the type of the security token in the credential file.
Parameter | |
---|---|
Name | Description |
subjectTokenType |
ExternalAccountCredentials.SubjectTokenTypes |
Returns | |
---|---|
Type | Description |
PluggableAuthCredentials.Builder |
setSubjectTokenType(String subjectTokenType)
public PluggableAuthCredentials.Builder setSubjectTokenType(String subjectTokenType)
Sets the Security Token Service subject token type based on the OAuth 2.0 token exchange spec. Indicates the type of the security token in the credential file.
Parameter | |
---|---|
Name | Description |
subjectTokenType |
String |
Returns | |
---|---|
Type | Description |
PluggableAuthCredentials.Builder |
setTokenInfoUrl(String tokenInfoUrl)
public PluggableAuthCredentials.Builder setTokenInfoUrl(String tokenInfoUrl)
Sets the optional endpoint used to retrieve account related information. Required for gCloud session account identification.
Parameter | |
---|---|
Name | Description |
tokenInfoUrl |
String |
Returns | |
---|---|
Type | Description |
PluggableAuthCredentials.Builder |
setTokenUrl(String tokenUrl)
public PluggableAuthCredentials.Builder setTokenUrl(String tokenUrl)
Sets the Security Token Service token exchange endpoint.
Parameter | |
---|---|
Name | Description |
tokenUrl |
String |
Returns | |
---|---|
Type | Description |
PluggableAuthCredentials.Builder |
setUniverseDomain(String universeDomain)
public PluggableAuthCredentials.Builder setUniverseDomain(String universeDomain)
Sets the optional universe domain.
Parameter | |
---|---|
Name | Description |
universeDomain |
String |
Returns | |
---|---|
Type | Description |
PluggableAuthCredentials.Builder |
setWorkforcePoolUserProject(String workforcePoolUserProject)
public PluggableAuthCredentials.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. The underlying principal must still have serviceusage.services.use IAM permission to use the project for billing/quota.
Parameter | |
---|---|
Name | Description |
workforcePoolUserProject |
String |
Returns | |
---|---|
Type | Description |
PluggableAuthCredentials.Builder |