Class HttpBasicAuthProvider
java.lang.Object
io.helidon.security.spi.SynchronousProvider
io.helidon.security.providers.httpauth.HttpBasicAuthProvider
- All Implemented Interfaces:
AuthenticationProvider
,OutboundSecurityProvider
,SecurityProvider
public class HttpBasicAuthProvider
extends SynchronousProvider
implements AuthenticationProvider, OutboundSecurityProvider
Http authentication security provider.
Provides support for username and password authentication, with support for roles list.
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Deprecated, for removal: This API element is subject to removal in a future version.static final String
Deprecated, for removal: This API element is subject to removal in a future version.useEndpointConfig.PROPERTY_OUTBOUND_ID
instead, the value will change in 4.x as well -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Get a builder instance to construct a new security provider.static HttpBasicAuthProvider
Load this provider from configuration.boolean
isOutboundSupported
(ProviderRequest providerRequest, SecurityEnvironment outbondEnv, EndpointConfig outboundEp) 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 outboundEp) 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
-
Field Details
-
EP_PROPERTY_OUTBOUND_USER
Deprecated, for removal: This API element is subject to removal in a future version.useEndpointConfig.PROPERTY_OUTBOUND_ID
instead, the value will change in 4.x as wellConfigure this for outbound requests to override user to use.- See Also:
-
EP_PROPERTY_OUTBOUND_PASSWORD
@Deprecated(since="3.2.3", forRemoval=true) public static final String EP_PROPERTY_OUTBOUND_PASSWORDDeprecated, for removal: This API element is subject to removal in a future version.useEndpointConfig.PROPERTY_OUTBOUND_SECRET
instead, the value will change in 4.x as wellConfigure this for outbound requests to override password to use.- See Also:
-
-
Method Details
-
builder
Get a builder instance to construct a new security provider. Alternative approach iscreate(Config)
(orcreate(Config)
).- Returns:
- builder to fluently construct Basic security provider
-
create
Load this provider from configuration.- Parameters:
config
- Configuration located at this provider's configuration (e.g. child is either http-basic-auth or http-digest-auth)- Returns:
- instance of provider configured from provided config
-
isOutboundSupported
public boolean isOutboundSupported(ProviderRequest providerRequest, SecurityEnvironment outbondEnv, EndpointConfig outboundEp) 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 receivedoutbondEnv
- environment for outbound calloutboundEp
- 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 outboundEp) 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 calloutboundEp
- endpoint config for outbound call- Returns:
- outbound response
- See Also:
-
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:
-
EndpointConfig.PROPERTY_OUTBOUND_SECRET
instead, the value will change in 4.x as well