Class HttpBasicAuthProvider.Builder
java.lang.Object
io.helidon.security.providers.httpauth.HttpBasicAuthProvider.Builder
- All Implemented Interfaces:
Builder<HttpBasicAuthProvider.Builder,
,HttpBasicAuthProvider> Supplier<HttpBasicAuthProvider>
- Enclosing class:
HttpBasicAuthProvider
public static final class HttpBasicAuthProvider.Builder
extends Object
implements Builder<HttpBasicAuthProvider.Builder,HttpBasicAuthProvider>
HttpBasicAuthProvider
fluent API builder.-
Method Summary
Modifier and TypeMethodDescriptionaddOutboundTarget
(OutboundTarget target) Add a new outbound target to configure identity propagation or explicit username/password.addUserStore
(SecureUserStore store) Add a user store to the list of stores used by this provider.build()
Build the instance from this builder.Update this builder from configuration.optional
(boolean optional) Whether authentication is required.Set the realm to use when challenging users.subjectType
(SubjectType subjectType) Principal type this provider extracts (and also propagates).userStore
(SecureUserStore store) Set user store to validate users.
-
Method Details
-
config
Update this builder from configuration.- Parameters:
config
- configuration to read, located on the node of the http basic authentication provider- Returns:
- updated builder instance
-
build
Description copied from interface:Builder
Build the instance from this builder.- Specified by:
build
in interfaceBuilder<HttpBasicAuthProvider.Builder,
HttpBasicAuthProvider> - Returns:
- instance of the built type
-
subjectType
Principal type this provider extracts (and also propagates).- Parameters:
subjectType
- type of principal- Returns:
- updated builder instance
-
addUserStore
Add a user store to the list of stores used by this provider.- Parameters:
store
- user store to add- Returns:
- updated builder instance
-
userStore
Set user store to validate users. Removes any other stores added throughaddUserStore(SecureUserStore)
.- Parameters:
store
- User store to use- Returns:
- updated builder instance
-
realm
Set the realm to use when challenging users.- Parameters:
realm
- security realm name to send to browser (or any other client) when unauthenticated- Returns:
- updated builder instance
-
optional
Whether authentication is required. By default, request will fail if the authentication cannot be verified. If set to false, request will process and this provider will abstain.- Parameters:
optional
- whether authentication is optional (true) or required (false)- Returns:
- updated builder instance
-
addOutboundTarget
Add a new outbound target to configure identity propagation or explicit username/password.- Parameters:
target
- outbound target- Returns:
- updated builder instance
-