Class SecurityContext.Builder

java.lang.Object
io.helidon.security.SecurityContext.Builder
All Implemented Interfaces:
Builder<SecurityContext.Builder,SecurityContext>, Supplier<SecurityContext>
Enclosing interface:
SecurityContext

public static class SecurityContext.Builder extends Object implements Builder<SecurityContext.Builder,SecurityContext>
Fluent API builder for SecurityContext.
  • Method Details

    • build

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

      Id of the new security context. This should be usable for correlation of log records, traces etc.

      Use this method only if you need to override default behavior!

      Parameters:
      id - id to use, by default this used security UUID post-fixed by id you gave to Security.contextBuilder(String)
      Returns:
      updated builder instance
    • executorService

      public SecurityContext.Builder executorService(Supplier<ExecutorService> executorServiceSupplier)
      Executor service to use for requests within this context. By default uses a custom executor service that is configured when building Security instance.

      Use this method only if you need to override default behavior!

      Parameters:
      executorServiceSupplier - supplier of an executor service
      Returns:
      updated builder instance
    • executorService

      public SecurityContext.Builder executorService(ExecutorService executorService)
      Executor service to use for requests within this context. By default uses a custom executor service that is configured when building Security instance.

      Use this method only if you need to override default behavior!

      Parameters:
      executorService - executor service
      Returns:
      updated builder instance
    • serverTime

      public SecurityContext.Builder serverTime(SecurityTime serverTime)
      SecurityTime to use when determining current time. Used e.g. when creating a new SecurityEnvironment. By default uses server time that is configured for Security instance

      Use this method only if you need to override default behavior!

      Parameters:
      serverTime - the server time to use
      Returns:
      updated builder instance
    • tracingTracer

      public SecurityContext.Builder tracingTracer(Tracer tracingTracer)
      Tracer used to create new span contexts when tracing security events. By default uses tracer of Security instance.

      Use this method only if you need to override default behavior!

      Parameters:
      tracingTracer - tracer to use
      Returns:
      updated builder instance
    • tracingSpan

      public SecurityContext.Builder tracingSpan(SpanContext tracingSpan)
      Open tracing span context to correctly trace security.
      Parameters:
      tracingSpan - Open tracing span context of the request within which we create this security context
      Returns:
      updated builder instance
    • env

      Set the security environment to start with.
      Parameters:
      env - environment to use for security requests
      Returns:
      updated builder instance
    • endpointConfig

      public SecurityContext.Builder endpointConfig(EndpointConfig ec)
      Set the endpoint configuration to start with.
      Parameters:
      ec - configuration specific to an endpoint (including annotations, custom objects etc.)
      Returns:
      updated builder instance