Module io.helidon.security
Package io.helidon.security
Class CompositeProviderSelectionPolicy.Builder
java.lang.Object
io.helidon.security.CompositeProviderSelectionPolicy.Builder
- All Implemented Interfaces:
Builder<CompositeProviderSelectionPolicy.Builder,
,Function<ProviderSelectionPolicy.Providers, ProviderSelectionPolicy>> Supplier<Function<ProviderSelectionPolicy.Providers,
ProviderSelectionPolicy>>
- Enclosing class:
- CompositeProviderSelectionPolicy
public static final class CompositeProviderSelectionPolicy.Builder
extends Object
implements Builder<CompositeProviderSelectionPolicy.Builder,Function<ProviderSelectionPolicy.Providers,ProviderSelectionPolicy>>
Fluent API builder to create
CompositeProviderSelectionPolicy
.
Invoke build()
to get a function to be sent to Security.Builder.providerSelectionPolicy(Function)
.-
Method Summary
Modifier and TypeMethodDescriptionaddAuthenticationProvider
(String namedProvider) Add a required provider to this composite provider.addAuthenticationProvider
(String namedProvider, CompositeProviderFlag flag) Add a provider to this composite policy.addAuthorizationProvider
(String namedProvider) Add a required provider to this composite provider.addAuthorizationProvider
(String namedProvider, CompositeProviderFlag flag) Add a provider to this composite policy.addOutboundProvider
(String namedProvider) Add a provider to this composite policy.build()
Build a function to create an instance of this provider as expected bySecurity.Builder.providerSelectionPolicy(Function)
.Update fields from configuration.isDefault
(boolean isDefault) If set to true (default value) then this policy returns a virtual provider combining the configured providers.Name of this provider to use for explicit provider configuration.
-
Method Details
-
name
Name of this provider to use for explicit provider configuration. The same name is used for authentication, authorization and outbound security.- Parameters:
name
- name of the virtual provider create by this policy- Returns:
- updated builder instance
-
isDefault
If set to true (default value) then this policy returns a virtual provider combining the configured providers. If set to false, the virtual provider is returned only when explicitly called byname
.- Parameters:
isDefault
- whether the composite provider is the default- Returns:
- updated builder instance
-
addAuthenticationProvider
Add a required provider to this composite provider.- Parameters:
namedProvider
- name of the provider as configured with security- Returns:
- updated builder instance
-
addAuthenticationProvider
public CompositeProviderSelectionPolicy.Builder addAuthenticationProvider(String namedProvider, CompositeProviderFlag flag) Add a provider to this composite policy.- Parameters:
namedProvider
- name of the provider as configured with securityflag
- to indicate how to handle provider's response- Returns:
- updated builder instance
-
addAuthorizationProvider
Add a required provider to this composite provider.- Parameters:
namedProvider
- name of the provider as configured with security- Returns:
- updated builder instance
-
addAuthorizationProvider
public CompositeProviderSelectionPolicy.Builder addAuthorizationProvider(String namedProvider, CompositeProviderFlag flag) Add a provider to this composite policy.- Parameters:
namedProvider
- name of the provider as configured with securityflag
- to indicate how to handle provider's response- Returns:
- updated builder instance
-
addOutboundProvider
Add a provider to this composite policy.- Parameters:
namedProvider
- name of the provider as configured with security- Returns:
- updated builder instance
-
config
Update fields from configuration.- Parameters:
config
- Configuration- Returns:
- updated builder instance
-
build
Build a function to create an instance of this provider as expected bySecurity.Builder.providerSelectionPolicy(Function)
.- Specified by:
build
in interfaceBuilder<CompositeProviderSelectionPolicy.Builder,
Function<ProviderSelectionPolicy.Providers, ProviderSelectionPolicy>> - Returns:
- function to build this policy
-