public final class CompositeProviderSelectionPolicy extends Object implements ProviderSelectionPolicy
Example configuration:
security.provider-policy {
type = "COMPOSITE"
# explicit name of this policy (to be used when this is not the default or when we want to explicitly reference it)
name = "composite"
# whether this is the default provider or not (if not, must be explicitly defined by name, if yes, it is returned)
default = true
authentication: [
{
name = "first"
flag = "REQUIRED"
},
{
name = "second"
}]
outbound: [
{
name = "first"
},
{
name = "second"
}]
}
| Modifier and Type | Class and Description |
|---|---|
static class |
CompositeProviderSelectionPolicy.Builder
Fluent API builder to create
CompositeProviderSelectionPolicy. |
ProviderSelectionPolicy.Providers| Modifier and Type | Method and Description |
|---|---|
static CompositeProviderSelectionPolicy.Builder |
builder()
Builder for this selection policy.
|
static Function<ProviderSelectionPolicy.Providers,ProviderSelectionPolicy> |
create(Config config)
Load this policy from config.
|
List<OutboundSecurityProvider> |
selectOutboundProviders()
Specific method for outbound providers, as we have an option to choose the first outbound provider that matches
the current request.
|
<T extends SecurityProvider> |
selectProvider(Class<T> providerType)
Select a provider instance of the type defined that this policy has configured as the default.
|
<T extends SecurityProvider> |
selectProvider(Class<T> providerType,
String requestedName)
Select a provider instance of the type defined that this policy finds for the requested name.
|
public static CompositeProviderSelectionPolicy.Builder builder()
public static Function<ProviderSelectionPolicy.Providers,ProviderSelectionPolicy> create(Config config)
CompositeProviderSelectionPolicy for example.config - configuration instanceSecurity.Builder.providerSelectionPolicy(Function)public <T extends SecurityProvider> Optional<T> selectProvider(Class<T> providerType)
ProviderSelectionPolicyselectProvider in interface ProviderSelectionPolicyT - type of providerproviderType - type of provider (one of AuthenticationProvider, AuthorizationProvider)public List<OutboundSecurityProvider> selectOutboundProviders()
ProviderSelectionPolicyselectOutboundProviders in interface ProviderSelectionPolicypublic <T extends SecurityProvider> Optional<T> selectProvider(Class<T> providerType, String requestedName)
ProviderSelectionPolicyselectProvider in interface ProviderSelectionPolicyT - type of providerproviderType - type of provider (one of AuthenticationProvider, AuthorizationProvider or OutboundSecurityProvider)requestedName - explicit provider name to findCopyright © 2018, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.