Class OidcFeature.Builder

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

public static class OidcFeature.Builder extends Object implements Builder<OidcFeature.Builder,OidcFeature>
A fluent API builder for OidcFeature.
  • Method Details

    • build

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

      public OidcFeature.Builder config(Config config)
      Config located at the provider's key to read OidcConfig.
      Parameters:
      config - configuration at the node of the provider
      Returns:
      updated builder instance
    • config

      public OidcFeature.Builder config(OidcConfig config)
      Use the provided OidcConfig for this builder.
      Parameters:
      config - OIDC configuration to use
      Returns:
      updated builder instance
    • config

      public OidcFeature.Builder config(Config config, String providerName)
      Config located either at the configuration root, or at the provider node.
      Parameters:
      config - configuration to use
      providerName - name of the security provider used for the OidcFeature configuration
      Returns:
      updated builder instance
    • enabled

      public OidcFeature.Builder enabled(boolean enabled)
      You can disable the OIDC support in case it should not be used. This can also be achieved through configuration, by setting security.enabled to false when using root configuration, or by setting enabled to false when using provider configuration node.
      Parameters:
      enabled - whether the support should be enabled or not
      Returns:
      updated builder instance
    • discoverTenantConfigProviders

      public OidcFeature.Builder discoverTenantConfigProviders(boolean discoverConfigProviders)
      Whether to allow TenantConfigProvider service loader discovery. Default value is true.
      Parameters:
      discoverConfigProviders - whether to use service loader
      Returns:
      updated builder instance
    • addTenantConfigFinder

      public OidcFeature.Builder addTenantConfigFinder(TenantConfigFinder configFinder)
      Add specific TenantConfigFinder implementation. Priority BUILDER_WEIGHT is used.
      Parameters:
      configFinder - config finder implementation
      Returns:
      updated builder instance
    • addTenantConfigFinder

      public OidcFeature.Builder addTenantConfigFinder(TenantConfigFinder configFinder, int priority)
      Add specific TenantConfigFinder implementation with specific priority.
      Parameters:
      configFinder - config finder implementation
      priority - finder priority
      Returns:
      updated builder instance