Class GoogleCredentialsBundle

java.lang.Object
google.registry.util.GoogleCredentialsBundle
All Implemented Interfaces:
Serializable

public class GoogleCredentialsBundle extends Object implements Serializable
Helper class to provide HttpTransport, JsonFactory and HttpRequestInitializer for a given GoogleCredentials. These classes are normally needed for creating the instance of a GCP client.
See Also:
  • Constructor Details

    • GoogleCredentialsBundle

      protected GoogleCredentialsBundle(com.google.auth.oauth2.GoogleCredentials googleCredentials)
  • Method Details

    • create

      public static GoogleCredentialsBundle create(com.google.auth.oauth2.GoogleCredentials credentials)
      Creates a GoogleCredentialsBundle instance from given GoogleCredentials.
    • serviceAccount

      public String serviceAccount()
      Returns the service account email address of the underlying GoogleCredentials, if possible.
    • getGoogleCredentials

      public com.google.auth.oauth2.GoogleCredentials getGoogleCredentials()
      Returns the same GoogleCredentials used to create this object.
    • getHttpTransport

      public com.google.api.client.http.HttpTransport getHttpTransport()
      Returns the instance of HttpTransport.
    • getJsonFactory

      public com.google.api.client.json.JsonFactory getJsonFactory()
      Returns the instance of JsonFactory.
    • getHttpRequestInitializer

      public com.google.api.client.http.HttpRequestInitializer getHttpRequestInitializer()
      Returns the instance of HttpRequestInitializer.