public class IdentityPoolCredentials extends ExternalAccountCredentials
By default, attempts to exchange the external credential for a GCP access token.
| Modifier and Type | Class and Description |
|---|---|
static class |
IdentityPoolCredentials.Builder |
OAuth2Credentials.CredentialsChangedListenerimpersonatedCredentials, transportFactory| Modifier and Type | Method and Description |
|---|---|
IdentityPoolCredentials |
createScoped(Collection<String> newScopes)
Clones the IdentityPoolCredentials with the specified scopes.
|
String |
getWorkforcePoolUserProject() |
boolean |
isWorkforcePoolConfiguration()
Returns whether or not the current configuration is for Workforce Pools (which enable 3p user
identities, rather than workloads).
|
static IdentityPoolCredentials.Builder |
newBuilder() |
static IdentityPoolCredentials.Builder |
newBuilder(IdentityPoolCredentials identityPoolCredentials) |
AccessToken |
refreshAccessToken()
Method to refresh the access token according to the specific type of credentials.
|
String |
retrieveSubjectToken()
Retrieves the external subject token to be exchanged for a GCP access token.
|
exchangeExternalCredentialForAccessToken, fromStream, fromStream, getAudience, getClientId, getClientSecret, getCredentialSource, getQuotaProjectId, getRequestMetadata, getRequestMetadata, getScopes, getServiceAccountImpersonationUrl, getSubjectTokenType, getTokenInfoUrl, getTokenUrlcreate, createDelegated, createScoped, createScoped, createScopedRequired, getApplicationDefault, getApplicationDefault, toBuilderaddChangeListener, equals, getAccessToken, getAdditionalHeaders, getAuthenticationType, getFromServiceLoader, getRequestMetadataInternal, hashCode, hasRequestMetadata, hasRequestMetadataOnly, newInstance, refresh, refreshIfExpired, removeChangeListener, toStringblockingGetToCallback, getRequestMetadatapublic AccessToken refreshAccessToken() throws IOException
OAuth2CredentialsThrows IllegalStateException if not overridden since direct use of OAuth2Credentials is only for temporary or non-refreshing access tokens.
refreshAccessToken in class OAuth2CredentialsIOExceptionpublic String retrieveSubjectToken() throws IOException
ExternalAccountCredentialsMust be implemented by subclasses as the retrieval method is dependent on the credential source.
retrieveSubjectToken in class ExternalAccountCredentialsIOExceptionpublic boolean isWorkforcePoolConfiguration()
public IdentityPoolCredentials createScoped(Collection<String> newScopes)
createScoped in class GoogleCredentialsnewScopes - Collection of scopes to request.public static IdentityPoolCredentials.Builder newBuilder()
public static IdentityPoolCredentials.Builder newBuilder(IdentityPoolCredentials identityPoolCredentials)
Copyright © 2021 Google. All rights reserved.