Package com.google.auth.oauth2
Class GdchCredentials
- java.lang.Object
-
- com.google.auth.Credentials
-
- com.google.auth.oauth2.OAuth2Credentials
-
- com.google.auth.oauth2.GoogleCredentials
-
- com.google.auth.oauth2.GdchCredentials
-
- All Implemented Interfaces:
QuotaProjectIdProvider
,Serializable
public class GdchCredentials extends GoogleCredentials
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
GdchCredentials.Builder
-
Nested classes/interfaces inherited from class com.google.auth.oauth2.OAuth2Credentials
OAuth2Credentials.CredentialsChangedListener
-
-
Field Summary
-
Fields inherited from class com.google.auth.oauth2.GoogleCredentials
quotaProjectId
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description GdchCredentials
createWithGdchAudience(URI apiAudience)
Create a copy of GDCH credentials with the specified audience.boolean
equals(Object obj)
URI
getApiAudience()
String
getCaCertPath()
PrivateKey
getPrivateKey()
String
getPrivateKeyId()
String
getProjectId()
String
getServiceIdentityName()
URI
getTokenServerUri()
HttpTransportFactory
getTransportFactory()
int
hashCode()
static GdchCredentials.Builder
newBuilder()
AccessToken
refreshAccessToken()
Refresh the OAuth2 access token by getting a new access token using a JSON Web Token (JWT).GdchCredentials.Builder
toBuilder()
String
toString()
-
Methods inherited from class com.google.auth.oauth2.GoogleCredentials
create, createDelegated, createScoped, createScoped, createScoped, createScopedRequired, createWithCustomRetryStrategy, createWithQuotaProject, fromStream, fromStream, getAdditionalHeaders, getApplicationDefault, getApplicationDefault, getQuotaProjectId
-
Methods inherited from class com.google.auth.oauth2.OAuth2Credentials
addChangeListener, getAccessToken, getAuthenticationType, getFromServiceLoader, getRequestMetadata, getRequestMetadata, getRequestMetadataInternal, hasRequestMetadata, hasRequestMetadataOnly, newInstance, refresh, refreshIfExpired, removeChangeListener
-
Methods inherited from class com.google.auth.Credentials
blockingGetToCallback, getRequestMetadata
-
-
-
-
Method Detail
-
createWithGdchAudience
public GdchCredentials createWithGdchAudience(URI apiAudience) throws IOException
Create a copy of GDCH credentials with the specified audience.- Parameters:
apiAudience
- The intended audience for GDCH credentials.- Throws:
IOException
-
refreshAccessToken
public AccessToken refreshAccessToken() throws IOException
Refresh the OAuth2 access token by getting a new access token using a JSON Web Token (JWT).For GDCH credentials, this class creates a self-signed JWT, and sends to the GDCH authentication endpoint (tokenServerUri) to exchange an access token for the intended api audience (apiAudience).
- Overrides:
refreshAccessToken
in classOAuth2Credentials
- Returns:
- never
- Throws:
IOException
-
getProjectId
public final String getProjectId()
-
getPrivateKeyId
public final String getPrivateKeyId()
-
getPrivateKey
public final PrivateKey getPrivateKey()
-
getServiceIdentityName
public final String getServiceIdentityName()
-
getTokenServerUri
public final URI getTokenServerUri()
-
getApiAudience
public final URI getApiAudience()
-
getTransportFactory
public final HttpTransportFactory getTransportFactory()
-
getCaCertPath
public final String getCaCertPath()
-
newBuilder
public static GdchCredentials.Builder newBuilder()
-
toBuilder
public GdchCredentials.Builder toBuilder()
- Overrides:
toBuilder
in classGoogleCredentials
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classOAuth2Credentials
-
toString
public String toString()
- Overrides:
toString
in classOAuth2Credentials
-
equals
public boolean equals(Object obj)
- Overrides:
equals
in classOAuth2Credentials
-
-