java.lang.Object
io.helidon.security.providers.google.login.GoogleTokenProvider.Builder
All Implemented Interfaces:
Builder<GoogleTokenProvider.Builder,GoogleTokenProvider>, Supplier<GoogleTokenProvider>
Enclosing class:
GoogleTokenProvider

public static final class GoogleTokenProvider.Builder extends Object implements Builder<GoogleTokenProvider.Builder,GoogleTokenProvider>
Fluent API builder to build GoogleTokenProvider instance.
  • Method Details

    • build

      public GoogleTokenProvider build()
      Description copied from interface: Builder
      Build the instance from this builder.
      Specified by:
      build in interface Builder<GoogleTokenProvider.Builder,GoogleTokenProvider>
      Returns:
      instance of the built type
    • clientId

      public GoogleTokenProvider.Builder clientId(String clientId)
      Google application client id, to validate that the token was generated by Google for us.
      Parameters:
      clientId - client id as obtained from Google developer console
      Returns:
      updated builder instance
    • optional

      public GoogleTokenProvider.Builder optional(boolean optional)
      If set to true, this provider will return SecurityResponse.SecurityStatus.ABSTAIN instead of failing in case of invalid request.
      Parameters:
      optional - whether to be optional or not
      Returns:
      updated builder instance
    • tokenProvider

      public GoogleTokenProvider.Builder tokenProvider(TokenHandler provider)
      Token provider to extract Google access token from request, defaults to "Authorization" header with a "bearer " prefix.
      Parameters:
      provider - token provider
      Returns:
      updated builder instance
    • realm

      public GoogleTokenProvider.Builder realm(String realm)
      Set the authentication realm to build challenge, defaults to "helidon".
      Parameters:
      realm - realm of authentication
      Returns:
      updated builder instance
    • proxyHost

      public GoogleTokenProvider.Builder proxyHost(String host)
      Set proxy host when talking to Google.
      Parameters:
      host - host of http proxy server
      Returns:
      updated builder instance
    • proxyPort

      public GoogleTokenProvider.Builder proxyPort(int port)
      Set proxy port when talking to Google.
      Parameters:
      port - port of http proxy server, defaults to 80
      Returns:
      updated builder instance
    • config

      public GoogleTokenProvider.Builder config(Config config)
      Update this builder from configuration.
      Parameters:
      config - Configuration at provider (security.provider.x) key
      Returns:
      updated builder instance
    • outboundConfig

      public GoogleTokenProvider.Builder outboundConfig(OutboundConfig outboundConfig)
      Outbound configuration - a set of outbound targets that will have the token propagated.
      Parameters:
      outboundConfig - configuration of outbound
      Returns:
      updated builder instance