Class GoogleCredentialsConfiguration


  • @ConfigurationProperties("gcp.credentials")
    @Context
    public class GoogleCredentialsConfiguration
    extends java.lang.Object
    Configuration for the Google credentials.
    Since:
    1.0
    Author:
    graemerocher, Ray Tsang
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.util.List<java.net.URI> DEFAULT_SCOPES
      The default scopes.
      static java.lang.String PREFIX
      The prefix to use.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Optional<java.lang.String> getEncodedKey()
      The Base64 encoded service account key content.
      java.util.Optional<java.lang.String> getLocation()
      The location of the service account credential key file.
      java.util.List<java.net.URI> getScopes()
      The scopes to use.
      void setEncodedKey​(java.lang.String encodedKey)
      Sets the Base64 encoded service account key content..
      void setLocation​(java.lang.String location)
      Sets the location to the service account credential key file.
      void setScopes​(java.util.List<java.net.URI> scopes)
      The default scopes to associate with the application to access specific APIs.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • DEFAULT_SCOPES

        public static final java.util.List<java.net.URI> DEFAULT_SCOPES
        The default scopes.
    • Constructor Detail

      • GoogleCredentialsConfiguration

        public GoogleCredentialsConfiguration()
    • Method Detail

      • getScopes

        @Nonnull
        public java.util.List<java.net.URI> getScopes()
        The scopes to use.
        Returns:
        The scopes
      • setScopes

        public void setScopes​(@Nullable
                              java.util.List<java.net.URI> scopes)
        The default scopes to associate with the application to access specific APIs. See Google Scopes for a complete list. Leave this empty if you don't need additional API access.
        Parameters:
        scopes - The scopes
      • getLocation

        @Nonnull
        public java.util.Optional<java.lang.String> getLocation()
        The location of the service account credential key file. See Understanding Service Accounts for more information on generating a service account key file.
        Returns:
        The location
      • setLocation

        public void setLocation​(@Nullable
                                java.lang.String location)
        Sets the location to the service account credential key file.
        Parameters:
        location - The location
      • getEncodedKey

        @Nonnull
        public java.util.Optional<java.lang.String> getEncodedKey()
        The Base64 encoded service account key content. This is not recommended except if you need to encode service account key via an environmental variable. For other use cases, configure
        location
        instead.
        Returns:
        The key
      • setEncodedKey

        public void setEncodedKey​(@Nullable
                                  java.lang.String encodedKey)
        Sets the Base64 encoded service account key content..
        Parameters:
        encodedKey - The key