Package io.helidon.security
Class CompositeProviderSelectionPolicy.Builder
- java.lang.Object
-
- io.helidon.security.CompositeProviderSelectionPolicy.Builder
-
- All Implemented Interfaces:
Builder<Function<ProviderSelectionPolicy.Providers,ProviderSelectionPolicy>>
,Supplier<Function<ProviderSelectionPolicy.Providers,ProviderSelectionPolicy>>
- Enclosing class:
- CompositeProviderSelectionPolicy
public static final class CompositeProviderSelectionPolicy.Builder extends Object implements Builder<Function<ProviderSelectionPolicy.Providers,ProviderSelectionPolicy>>
Fluent API builder to createCompositeProviderSelectionPolicy
. Invokebuild()
to get a function to be sent toSecurity.Builder.providerSelectionPolicy(Function)
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompositeProviderSelectionPolicy.Builder
addAuthenticationProvider(String namedProvider)
Add a required provider to this composite provider.CompositeProviderSelectionPolicy.Builder
addAuthenticationProvider(String namedProvider, CompositeProviderFlag flag)
Add a provider to this composite policy.CompositeProviderSelectionPolicy.Builder
addAuthorizationProvider(String namedProvider)
Add a required provider to this composite provider.CompositeProviderSelectionPolicy.Builder
addAuthorizationProvider(String namedProvider, CompositeProviderFlag flag)
Add a provider to this composite policy.CompositeProviderSelectionPolicy.Builder
addOutboundProvider(String namedProvider)
Add a provider to this composite policy.Function<ProviderSelectionPolicy.Providers,ProviderSelectionPolicy>
build()
Build a function to create an instance of this provider as expected bySecurity.Builder.providerSelectionPolicy(Function)
.CompositeProviderSelectionPolicy.Builder
config(Config config)
Update fields from configuration.CompositeProviderSelectionPolicy.Builder
isDefault(boolean isDefault)
If set to true (default value) then this policy returns a virtual provider combining the configured providers.CompositeProviderSelectionPolicy.Builder
name(String name)
Name of this provider to use for explicit provider configuration.
-
-
-
Method Detail
-
name
public CompositeProviderSelectionPolicy.Builder name(String 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
public CompositeProviderSelectionPolicy.Builder isDefault(boolean 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
public CompositeProviderSelectionPolicy.Builder addAuthenticationProvider(String namedProvider)
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
public CompositeProviderSelectionPolicy.Builder addAuthorizationProvider(String namedProvider)
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
public CompositeProviderSelectionPolicy.Builder addOutboundProvider(String namedProvider)
Add a provider to this composite policy.- Parameters:
namedProvider
- name of the provider as configured with security- Returns:
- updated builder instance
-
config
public CompositeProviderSelectionPolicy.Builder config(Config config)
Update fields from configuration.- Parameters:
config
- Configuration- Returns:
- updated builder instance
-
build
public Function<ProviderSelectionPolicy.Providers,ProviderSelectionPolicy> build()
Build a function to create an instance of this provider as expected bySecurity.Builder.providerSelectionPolicy(Function)
.- Specified by:
build
in interfaceBuilder<Function<ProviderSelectionPolicy.Providers,ProviderSelectionPolicy>>
- Returns:
- function to build this policy
-
-