Class DownscopedCredentials.Builder

java.lang.Object
com.google.auth.oauth2.OAuth2Credentials.Builder
com.google.auth.oauth2.DownscopedCredentials.Builder
Enclosing class:
DownscopedCredentials

public static class DownscopedCredentials.Builder extends OAuth2Credentials.Builder
  • Field Details

  • Constructor Details

    • Builder

      private Builder()
  • Method Details

    • setSourceCredential

      @CanIgnoreReturnValue public DownscopedCredentials.Builder setSourceCredential(GoogleCredentials sourceCredential)
      Sets the required source credential used to acquire the downscoped credential.
      Parameters:
      sourceCredential - the GoogleCredentials to set
      Returns:
      this Builder object
    • setCredentialAccessBoundary

      @CanIgnoreReturnValue public DownscopedCredentials.Builder setCredentialAccessBoundary(CredentialAccessBoundary credentialAccessBoundary)
      Sets the required credential access boundary which specifies the upper bound of permissions that the credential can access. See CredentialAccessBoundary for more information.
      Parameters:
      credentialAccessBoundary - the CredentialAccessBoundary to set
      Returns:
      this Builder object
    • setHttpTransportFactory

      @CanIgnoreReturnValue public DownscopedCredentials.Builder setHttpTransportFactory(HttpTransportFactory transportFactory)
      Sets the HTTP transport factory.
      Parameters:
      transportFactory - the HttpTransportFactory to set
      Returns:
      this Builder object
    • setUniverseDomain

      @CanIgnoreReturnValue public DownscopedCredentials.Builder setUniverseDomain(String universeDomain)
      Sets the optional universe domain.
      Parameters:
      universeDomain - the universe domain to set
      Returns:
      this Builder object
    • build

      public DownscopedCredentials build()
      Overrides:
      build in class OAuth2Credentials.Builder