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 SummaryNested Classes Modifier and Type Class Description static classHttpBasicAuthProvider.BuilderHttpBasicAuthProviderfluent API builder.
 - 
Field SummaryFields Modifier and Type Field Description static StringEP_PROPERTY_OUTBOUND_PASSWORDConfigure this for outbound requests to override password to use.static StringEP_PROPERTY_OUTBOUND_USERConfigure this for outbound requests to override user to use.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static HttpBasicAuthProvider.Builderbuilder()Get a builder instance to construct a new security provider.static HttpBasicAuthProvidercreate(Config config)Load 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.SynchronousProviderauthenticate, authorize, outboundSecurity, syncAuthorize
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface io.helidon.security.spi.AuthenticationProviderauthenticate
 - 
Methods inherited from interface io.helidon.security.spi.OutboundSecurityProvideroutboundSecurity
 - 
Methods inherited from interface io.helidon.security.spi.SecurityProvidersupportedAnnotations, supportedAttributes, supportedConfigKeys, supportedCustomObjects
 
- 
 
- 
- 
- 
Field Detail- 
EP_PROPERTY_OUTBOUND_USERpublic static final String EP_PROPERTY_OUTBOUND_USER Configure this for outbound requests to override user to use.- See Also:
- Constant Field Values
 
 - 
EP_PROPERTY_OUTBOUND_PASSWORDpublic static final String EP_PROPERTY_OUTBOUND_PASSWORD Configure this for outbound requests to override password to use.- See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
builderpublic static HttpBasicAuthProvider.Builder 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
 
 - 
createpublic static HttpBasicAuthProvider create(Config config) 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
 
 - 
isOutboundSupportedpublic 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 interface- OutboundSecurityProvider
- Parameters:
- providerRequest- context with environment, subject(s) etc. that was received
- outbondEnv- environment for outbound call
- outboundEp- outbound endpoint configuration
- Returns:
- true if this identity propagator can generate required headers for the path defined
 
 - 
syncOutboundprotected OutboundSecurityResponse syncOutbound(ProviderRequest providerRequest, SecurityEnvironment outboundEnv, EndpointConfig outboundEp) Description copied from class:SynchronousProviderSynchronous outbound security.- Overrides:
- syncOutboundin class- SynchronousProvider
- Parameters:
- providerRequest- context with environment, subject(s) etc.
- outboundEnv- environment of this outbound call
- outboundEp- endpoint config for outbound call
- Returns:
- outbound response
- See Also:
- OutboundSecurityProvider.outboundSecurity(ProviderRequest, SecurityEnvironment, EndpointConfig),- OutboundSecurityProvider.isOutboundSupported(ProviderRequest, SecurityEnvironment, EndpointConfig)
 
 - 
syncAuthenticateprotected AuthenticationResponse syncAuthenticate(ProviderRequest providerRequest) Description copied from class:SynchronousProviderSynchronous authentication.- Overrides:
- syncAuthenticatein class- SynchronousProvider
- Parameters:
- providerRequest- context with environment, subject(s) etc.
- Returns:
- authentication response
- See Also:
- AuthenticationProvider.authenticate(ProviderRequest)
 
 
- 
 
-