Interface GoogleCredentialsSupplier

All Superinterfaces:
Supplier<com.google.auth.oauth2.GoogleCredentials>
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface GoogleCredentialsSupplier extends Supplier<com.google.auth.oauth2.GoogleCredentials>
Interface to obtain a ServiceAccountCredentials for GCP IAM credentials authentication. Implementations are used by GcpIamCredentialsAuthentication.
Since:
2.3.2
Author:
Andreas Gebauer
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    default com.google.auth.oauth2.GoogleCredentials
    get()
    Exception-safe helper to get ServiceAccountCredentials from getCredentials().
    com.google.auth.oauth2.GoogleCredentials
    Get a GoogleCredentials for GCP IAM credentials authentication via JWT signing.
  • Method Details

    • get

      default com.google.auth.oauth2.GoogleCredentials get()
      Exception-safe helper to get ServiceAccountCredentials from getCredentials().
      Specified by:
      get in interface Supplier<com.google.auth.oauth2.GoogleCredentials>
      Returns:
      the ServiceAccountCredentials for JWT signing.
    • getCredentials

      com.google.auth.oauth2.GoogleCredentials getCredentials() throws IOException
      Get a GoogleCredentials for GCP IAM credentials authentication via JWT signing.
      Returns:
      the GoogleCredentials.
      Throws:
      IOException - if the credentials lookup fails.