Package io.micronaut.gcp.credentials
Class GoogleCredentialsConfiguration
- java.lang.Object
 - 
- io.micronaut.gcp.credentials.GoogleCredentialsConfiguration
 
 
- 
@ConfigurationProperties("gcp.credentials") @Context public class GoogleCredentialsConfiguration extends java.lang.ObjectConfiguration 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_SCOPESThe default scopes.static java.lang.StringPREFIXThe prefix to use. 
- 
Constructor Summary
Constructors Constructor Description GoogleCredentialsConfiguration() 
- 
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.voidsetEncodedKey(java.lang.String encodedKey)Sets the Base64 encoded service account key content..voidsetLocation(java.lang.String location)Sets the location to the service account credential key file.voidsetScopes(java.util.List<java.net.URI> scopes)The default scopes to associate with the application to access specific APIs. 
 - 
 
- 
- 
Field Detail
- 
DEFAULT_SCOPES
public static final java.util.List<java.net.URI> DEFAULT_SCOPES
The default scopes. 
- 
PREFIX
public static final java.lang.String PREFIX
The prefix to use.- See Also:
 - Constant Field Values
 
 
 - 
 
- 
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, configurelocation
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
 
 - 
 
 -