Class GoogleAuthCredentials


  • public class GoogleAuthCredentials
    extends io.grpc.CallCredentials
    GoogleAuthCredentials provides a Google OIDC ID token for making authenticated gRPC calls. Uses Google Application Default credentials to obtain the OIDC token used for authentication. The given token will be passed as authorization bearer token when making calls.
    • Constructor Detail

      • GoogleAuthCredentials

        public GoogleAuthCredentials​(Map<String,​String> options)
                              throws IOException
        Construct a new GoogleAuthCredentials with given options.
        Parameters:
        options - a map of options, Required unless specified: audience - Optional, Sets the target audience of the token obtained.
        Throws:
        IOException
    • Method Detail

      • applyRequestMetadata

        public void applyRequestMetadata​(io.grpc.CallCredentials.RequestInfo requestInfo,
                                         Executor appExecutor,
                                         io.grpc.CallCredentials.MetadataApplier applier)
        Specified by:
        applyRequestMetadata in class io.grpc.CallCredentials
      • thisUsesUnstableApi

        public void thisUsesUnstableApi()
        Specified by:
        thisUsesUnstableApi in class io.grpc.CallCredentials