Class OidcSupport.Builder
- java.lang.Object
-
- io.helidon.security.providers.oidc.OidcSupport.Builder
-
- All Implemented Interfaces:
Builder<OidcSupport>
,Supplier<OidcSupport>
- Enclosing class:
- OidcSupport
public static class OidcSupport.Builder extends Object implements Builder<OidcSupport>
A fluent API builder forOidcSupport
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OidcSupport.Builder
addTenantConfigFinder(TenantConfigFinder configFinder)
Add specificTenantConfigFinder
implementation.OidcSupport.Builder
addTenantConfigFinder(TenantConfigFinder configFinder, int priority)
Add specificTenantConfigFinder
implementation with specific priority.OidcSupport
build()
Build the instance from this builder.OidcSupport.Builder
config(Config config)
Config located at the provider's key to readOidcConfig
.OidcSupport.Builder
config(Config config, String providerName)
Config located either at the configuration root, or at the provider node.OidcSupport.Builder
config(OidcConfig config)
Use the providedOidcConfig
for this builder.OidcSupport.Builder
discoverTenantConfigProviders(boolean discoverConfigProviders)
Whether to allowTenantConfigProvider
service loader discovery.OidcSupport.Builder
enabled(boolean enabled)
You can disable the OIDC support in case it should not be used.
-
-
-
Method Detail
-
build
public OidcSupport build()
Description copied from interface:Builder
Build the instance from this builder.- Specified by:
build
in interfaceBuilder<OidcSupport>
- Returns:
- instance of the built type
-
config
public OidcSupport.Builder config(Config config)
Config located at the provider's key to readOidcConfig
.- Parameters:
config
- configuration at the node of the provider- Returns:
- updated builder instance
-
config
public OidcSupport.Builder config(OidcConfig config)
Use the providedOidcConfig
for this builder.- Parameters:
config
- OIDC configuration to use- Returns:
- updated builder instance
-
config
public OidcSupport.Builder config(Config config, String providerName)
Config located either at the configuration root, or at the provider node.- Parameters:
config
- configuration to useproviderName
- name of the security provider used for theOidcSupport
configuration- Returns:
- updated builder instance
-
enabled
public OidcSupport.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 settingsecurity.enabled
tofalse
when using root configuration, or by settingenabled
tofalse
when using provider configuration node.- Parameters:
enabled
- whether the support should be enabled or not- Returns:
- updated builder instance
-
discoverTenantConfigProviders
public OidcSupport.Builder discoverTenantConfigProviders(boolean discoverConfigProviders)
Whether to allowTenantConfigProvider
service loader discovery. Default value istrue
.- Parameters:
discoverConfigProviders
- whether to use service loader- Returns:
- updated builder instance
-
addTenantConfigFinder
public OidcSupport.Builder addTenantConfigFinder(TenantConfigFinder configFinder)
Add specificTenantConfigFinder
implementation. PriorityBUILDER_PRIORITY
is used.- Parameters:
configFinder
- config finder implementation- Returns:
- updated builder instance
-
addTenantConfigFinder
public OidcSupport.Builder addTenantConfigFinder(TenantConfigFinder configFinder, int priority)
Add specificTenantConfigFinder
implementation with specific priority.- Parameters:
configFinder
- config finder implementationpriority
- finder priority- Returns:
- updated builder instance
-
-