Class AuthConfig.Builder

  • Enclosing class:
    AuthConfig

    public static class AuthConfig.Builder
    extends Object
    Builder for creating AuthConfig instances.
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • apiKey

        public AuthConfig.Builder apiKey​(String apiKey)
        Sets the API key.
        Parameters:
        apiKey - the API key
        Returns:
        this builder
      • token

        public AuthConfig.Builder token​(String token)
        Sets the bearer token.
        Parameters:
        token - the bearer token
        Returns:
        this builder
      • headers

        public AuthConfig.Builder headers​(Map<String,​String> headers)
        Sets custom authentication headers.
        Parameters:
        headers - map of header name-value pairs
        Returns:
        this builder
      • build

        public AuthConfig build()
        Builds the AuthConfig instance.
        Returns:
        configured AuthConfig