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
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Get a builder instance to construct a new security provider.static HttpBasicAuthProviderLoad this provider from configuration.booleanisOutboundSupported(ProviderRequest providerRequest, SecurityEnvironment outbondEnv, EndpointConfig outboundEp) Check if the path to be executed is supported by this security provider.protected AuthenticationResponsesyncAuthenticate(ProviderRequest providerRequest) Synchronous authentication.protected OutboundSecurityResponsesyncOutbound(ProviderRequest providerRequest, SecurityEnvironment outboundEnv, EndpointConfig outboundEp) Synchronous outbound security.Methods inherited from class io.helidon.security.spi.SynchronousProvider
authenticate, authorize, outboundSecurity, syncAuthorizeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.helidon.security.spi.AuthenticationProvider
authenticateMethods inherited from interface io.helidon.security.spi.OutboundSecurityProvider
outboundSecurityMethods inherited from interface io.helidon.security.spi.SecurityProvider
supportedAnnotations, supportedAttributes, supportedConfigKeys, supportedCustomObjects
-
Field Details
-
EP_PROPERTY_OUTBOUND_USER
Configure this for outbound requests to override user to use.- See Also:
-
EP_PROPERTY_OUTBOUND_PASSWORD
Configure 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:OutboundSecurityProviderCheck if the path to be executed is supported by this security provider. Defaults to true.- Specified by:
isOutboundSupportedin 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:SynchronousProviderSynchronous outbound security.- Overrides:
syncOutboundin 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:SynchronousProviderSynchronous authentication.- Overrides:
syncAuthenticatein classSynchronousProvider- Parameters:
providerRequest- context with environment, subject(s) etc.- Returns:
- authentication response
- See Also:
-