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 classGdchCredentials.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 GdchCredentialscreateWithGdchAudience(URI apiAudience)Create a copy of GDCH credentials with the specified audience.booleanequals(Object obj)URIgetApiAudience()StringgetCaCertPath()PrivateKeygetPrivateKey()StringgetPrivateKeyId()StringgetProjectId()StringgetServiceIdentityName()URIgetTokenServerUri()HttpTransportFactorygetTransportFactory()inthashCode()static GdchCredentials.BuildernewBuilder()AccessTokenrefreshAccessToken()Refresh the OAuth2 access token by getting a new access token using a JSON Web Token (JWT).GdchCredentials.BuildertoBuilder()StringtoString()-
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:
refreshAccessTokenin 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:
toBuilderin classGoogleCredentials
-
hashCode
public int hashCode()
- Overrides:
hashCodein classOAuth2Credentials
-
toString
public String toString()
- Overrides:
toStringin classOAuth2Credentials
-
equals
public boolean equals(Object obj)
- Overrides:
equalsin classOAuth2Credentials
-
-