Class HeaderAtnProvider
java.lang.Object
io.helidon.security.spi.SynchronousProvider
io.helidon.security.providers.header.HeaderAtnProvider
- All Implemented Interfaces:
AuthenticationProvider
,OutboundSecurityProvider
,SecurityProvider
public class HeaderAtnProvider
extends SynchronousProvider
implements AuthenticationProvider, OutboundSecurityProvider
Security provider that extracts a username (or service name) from a header.
This provider also supports propagation of identity through a header.
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic HeaderAtnProvider.Builder
builder()
A builder for this provider.static HeaderAtnProvider
Create provider instance from configuration.boolean
isOutboundSupported
(ProviderRequest providerRequest, SecurityEnvironment outboundEnv, EndpointConfig outboundConfig) Check if the path to be executed is supported by this security provider.protected AuthenticationResponse
syncAuthenticate
(ProviderRequest providerRequest) Synchronous authentication.protected OutboundSecurityResponse
syncOutbound
(ProviderRequest providerRequest, SecurityEnvironment outboundEnv, EndpointConfig outboundEndpointConfig) Synchronous outbound security.Methods inherited from class io.helidon.security.spi.SynchronousProvider
authenticate, authorize, outboundSecurity, syncAuthorize
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.helidon.security.spi.AuthenticationProvider
authenticate
Methods inherited from interface io.helidon.security.spi.OutboundSecurityProvider
outboundSecurity
Methods inherited from interface io.helidon.security.spi.SecurityProvider
supportedAnnotations, supportedAttributes, supportedConfigKeys, supportedCustomObjects
-
Method Details
-
create
Create provider instance from configuration.- Parameters:
config
- configuration of this provider- Returns:
- provider instance
-
builder
A builder for this provider.- Returns:
- builder to create a new instance
-
syncAuthenticate
Description copied from class:SynchronousProvider
Synchronous authentication.- Overrides:
syncAuthenticate
in classSynchronousProvider
- Parameters:
providerRequest
- context with environment, subject(s) etc.- Returns:
- authentication response
- See Also:
-
isOutboundSupported
public boolean isOutboundSupported(ProviderRequest providerRequest, SecurityEnvironment outboundEnv, EndpointConfig outboundConfig) Description copied from interface:OutboundSecurityProvider
Check if the path to be executed is supported by this security provider. Defaults to true.- Specified by:
isOutboundSupported
in interfaceOutboundSecurityProvider
- Parameters:
providerRequest
- context with environment, subject(s) etc. that was receivedoutboundEnv
- environment for outbound calloutboundConfig
- outbound endpoint configuration- Returns:
- true if this identity propagator can generate required headers for the path defined
-
syncOutbound
protected OutboundSecurityResponse syncOutbound(ProviderRequest providerRequest, SecurityEnvironment outboundEnv, EndpointConfig outboundEndpointConfig) Description copied from class:SynchronousProvider
Synchronous outbound security.- Overrides:
syncOutbound
in classSynchronousProvider
- Parameters:
providerRequest
- context with environment, subject(s) etc.outboundEnv
- environment of this outbound calloutboundEndpointConfig
- endpoint config for outbound call- Returns:
- outbound response
- See Also:
-