public static class GcpIamAuthenticationOptions.GcpIamAuthenticationOptionsBuilder extends Object
GcpIamAuthenticationOptions
.public GcpIamAuthenticationOptions.GcpIamAuthenticationOptionsBuilder path(String path)
path
- must not be empty or null.this
GcpIamAuthenticationOptions.GcpIamAuthenticationOptionsBuilder
.public GcpIamAuthenticationOptions.GcpIamAuthenticationOptionsBuilder credential(com.google.api.client.googleapis.auth.oauth2.GoogleCredential credential)
credentials provider
.credential
- must not be null.this
GcpIamAuthenticationOptions.GcpIamAuthenticationOptionsBuilder
.credentialSupplier(GcpCredentialSupplier)
public GcpIamAuthenticationOptions.GcpIamAuthenticationOptionsBuilder credentialSupplier(GcpCredentialSupplier credentialSupplier)
GcpCredentialSupplier
, required to create a signed JWT.
Alternatively, configure static credentials
.credentialSupplier
- must not be null.this
GcpIamAuthenticationOptions.GcpIamAuthenticationOptionsBuilder
.credential(GoogleCredential)
public GcpIamAuthenticationOptions.GcpIamAuthenticationOptionsBuilder serviceAccountId(String serviceAccountId)
GoogleCredential.getServiceAccountId()
.serviceAccountId
- the service account id (email) to usethis
GcpIamAuthenticationOptions.GcpIamAuthenticationOptionsBuilder
.public GcpIamAuthenticationOptions.GcpIamAuthenticationOptionsBuilder projectId(String projectId)
GoogleCredential.getServiceAccountProjectId()
.projectId
- the GCP project id to use in GCP IAM API callsthis
GcpIamAuthenticationOptions.GcpIamAuthenticationOptionsBuilder
.public GcpIamAuthenticationOptions.GcpIamAuthenticationOptionsBuilder role(String role)
role
- must not be empty or null.this
GcpIamAuthenticationOptions.GcpIamAuthenticationOptionsBuilder
.public GcpIamAuthenticationOptions.GcpIamAuthenticationOptionsBuilder jwtValidity(Duration jwtValidity)
Duration
for the JWT expiration. This defaults to 15
minutes and cannot be more than a hour.jwtValidity
- must not be null.this
GcpIamAuthenticationOptions.GcpIamAuthenticationOptionsBuilder
.public GcpIamAuthenticationOptions.GcpIamAuthenticationOptionsBuilder clock(Clock clock)
Clock
used to calculate epoch seconds until the JWT
expiration.clock
- must not be null.this
GcpIamAuthenticationOptions.GcpIamAuthenticationOptionsBuilder
.public GcpIamAuthenticationOptions build()
GcpIamAuthenticationOptions
instance.GcpIamAuthenticationOptions
.Copyright © 2016–2019 Pivotal Software, Inc.. All rights reserved.