ProviderSelectionPolicypublic class CompositeProviderSelectionPolicy extends java.lang.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 | Description |
|---|---|---|
static class |
CompositeProviderSelectionPolicy.Builder |
Fluent API builder to create
CompositeProviderSelectionPolicy. |
ProviderSelectionPolicy.Providers| Modifier and Type | Method | Description |
|---|---|---|
static CompositeProviderSelectionPolicy.Builder |
builder() |
Builder for this selection policy.
|
static java.util.function.Function<ProviderSelectionPolicy.Providers,ProviderSelectionPolicy> |
fromConfig(Config config) |
Load this policy from config.
|
java.util.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(java.lang.Class<T> providerType) |
Select a provider instance of the type defined that this policy has configured as the default.
|
<T extends SecurityProvider> |
selectProvider(java.lang.Class<T> providerType,
java.lang.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 java.util.function.Function<ProviderSelectionPolicy.Providers,ProviderSelectionPolicy> fromConfig(Config config)
CompositeProviderSelectionPolicy for example.config - configuration instanceSecurity.Builder.providerSelectionPolicy(Function)public <T extends SecurityProvider> java.util.Optional<T> selectProvider(java.lang.Class<T> providerType)
ProviderSelectionPolicyselectProvider in interface ProviderSelectionPolicyT - type of providerproviderType - type of provider (one of AuthenticationProvider, AuthorizationProvider)public java.util.List<OutboundSecurityProvider> selectOutboundProviders()
ProviderSelectionPolicyselectOutboundProviders in interface ProviderSelectionPolicypublic <T extends SecurityProvider> java.util.Optional<T> selectProvider(java.lang.Class<T> providerType, java.lang.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.