Class HeaderAtnProvider.Builder

java.lang.Object
io.helidon.security.providers.header.HeaderAtnProvider.Builder
All Implemented Interfaces:
Builder<HeaderAtnProvider.Builder,HeaderAtnProvider>, Supplier<HeaderAtnProvider>
Enclosing class:
HeaderAtnProvider

public static final class HeaderAtnProvider.Builder extends Object implements Builder<HeaderAtnProvider.Builder,HeaderAtnProvider>
A fluent api Builder for HeaderAtnProvider.
  • Method Details

    • build

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

      public HeaderAtnProvider.Builder config(Config config)
      Load this builder from a configuration.
      Parameters:
      config - configuration to load from
      Returns:
      updated builder instance
    • subjectType

      public HeaderAtnProvider.Builder subjectType(SubjectType subjectType)
      Principal type this provider extracts (and also propagates).
      Parameters:
      subjectType - type of principal
      Returns:
      updated builder instance
    • propagate

      public HeaderAtnProvider.Builder propagate(boolean propagate)
      Whether to propagate identity.
      Parameters:
      propagate - whether to propagate identity (true) or not (false)
      Returns:
      updated builder instance
    • authenticate

      public HeaderAtnProvider.Builder authenticate(boolean authenticate)
      Whether to authenticate requests.
      Parameters:
      authenticate - whether to authenticate (true) or not (false)
      Returns:
      updated builder instance
    • atnTokenHandler

      public HeaderAtnProvider.Builder atnTokenHandler(TokenHandler tokenHandler)
      Token handler to extract username from request.
      Parameters:
      tokenHandler - token handler instance
      Returns:
      updated builder instance
    • outboundTokenHandler

      public HeaderAtnProvider.Builder outboundTokenHandler(TokenHandler tokenHandler)
      Token handler to create outbound headers to propagate identity. If not defined, atnTokenHandler will be used.
      Parameters:
      tokenHandler - token handler instance
      Returns:
      updated builder instance
    • optional

      public HeaderAtnProvider.Builder optional(boolean optional)
      Whether authentication is required. By default, request will fail if the username cannot be extracted. If set to false, request will process and this provider will abstain.
      Parameters:
      optional - whether authentication is optional (true) or required (false)
      Returns:
      updated builder instance
    • addOutboundTarget

      public HeaderAtnProvider.Builder addOutboundTarget(OutboundTarget target)
      Configure outbound target for identity propagation.
      Parameters:
      target - outbound target
      Returns:
      updated builder instance