Interface GcpCredentialSupplier

All Superinterfaces:
Supplier<com.google.api.client.googleapis.auth.oauth2.GoogleCredential>
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 GcpCredentialSupplier extends Supplier<com.google.api.client.googleapis.auth.oauth2.GoogleCredential>
Interface to obtain a GoogleCredential for GCP IAM authentication. Implementations are used by GcpIamAuthentication.
Since:
2.1
Author:
Mark Paluch
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    default com.google.api.client.googleapis.auth.oauth2.GoogleCredential
    get()
    Exception-safe helper to get GoogleCredential from getCredential().
    com.google.api.client.googleapis.auth.oauth2.GoogleCredential
    Get a GoogleCredential for GCP IAM authentication via JWT signing.
  • Method Details

    • get

      default com.google.api.client.googleapis.auth.oauth2.GoogleCredential get()
      Exception-safe helper to get GoogleCredential from getCredential().
      Specified by:
      get in interface Supplier<com.google.api.client.googleapis.auth.oauth2.GoogleCredential>
      Returns:
      the GoogleCredential for JWT signing.
    • getCredential

      com.google.api.client.googleapis.auth.oauth2.GoogleCredential getCredential() throws IOException
      Get a GoogleCredential for GCP IAM authentication via JWT signing.
      Returns:
      the GoogleCredential.
      Throws:
      IOException - if the credential lookup fails.