public class GcpIamAuthentication extends GcpJwtAuthenticationSupport implements ClientAuthentication
Credential
. Project and service account
details are obtained from a GoogleCredential
that can be retrieved either from
a JSON file or the runtime environment (GAE, GCE).
GcpIamAuthentication
uses Google Java API that uses synchronous API.GcpIamAuthenticationOptions
,
HttpTransport
,
GoogleCredential
,
GoogleCredentials.getApplicationDefault()
,
RestOperations
,
Auth Backend: gcp
(IAM),
GCP:
projects.serviceAccounts.signJwtConstructor and Description |
---|
GcpIamAuthentication(GcpIamAuthenticationOptions options,
RestOperations restOperations)
|
GcpIamAuthentication(GcpIamAuthenticationOptions options,
RestOperations restOperations,
com.google.api.client.http.HttpTransport httpTransport)
Create a new instance of
GcpIamAuthentication given
GcpIamAuthenticationOptions , RestOperations and
HttpTransport . |
Modifier and Type | Method and Description |
---|---|
VaultToken |
login()
Return a
VaultToken . |
protected String |
signJwt() |
public GcpIamAuthentication(GcpIamAuthenticationOptions options, RestOperations restOperations)
GcpIamAuthentication
given
GcpIamAuthenticationOptions
and RestOperations
. This constructor
initializes GoogleApacheHttpTransport
for Google API usage.options
- must not be null.restOperations
- HTTP client for for Vault login, must not be null.public GcpIamAuthentication(GcpIamAuthenticationOptions options, RestOperations restOperations, com.google.api.client.http.HttpTransport httpTransport)
GcpIamAuthentication
given
GcpIamAuthenticationOptions
, RestOperations
and
HttpTransport
.options
- must not be null.restOperations
- HTTP client for for Vault login, must not be null.httpTransport
- HTTP client for Google API use, must not be null.public VaultToken login() throws VaultException
ClientAuthentication
VaultToken
. This method can optionally log into Vault to obtain a
token
.login
in interface ClientAuthentication
VaultToken
.VaultException
protected String signJwt()
Copyright © 2016–2019 Pivotal Software, Inc.. All rights reserved.