java.lang.Object
io.helidon.security.EndpointConfig.Builder
- All Implemented Interfaces:
Builder<EndpointConfig.Builder,,EndpointConfig> Supplier<EndpointConfig>
- Enclosing class:
EndpointConfig
public static final class EndpointConfig.Builder
extends Object
implements Builder<EndpointConfig.Builder,EndpointConfig>
A fluent API builder for
EndpointConfig.-
Method Summary
Modifier and TypeMethodDescriptionaddAtribute(String key, Object value) Add an attribute to this endpoint configuration builder.build()Build the instance from this builder.Provide a configuration for provider to use.Provider a map of cofiguration keys to configurations for provider(s) to use.<U,V extends U>
EndpointConfig.BuildercustomObject(Class<U> objectClass, V anObject) Set or replace a custom object.customObjects(ClassToInstanceStore<Object> customObjects) Provide custom object map to be sent to security providers.securityLevels(List<SecurityLevel> securityLevels) Sets security levels to this endpoint configuration builder.
-
Method Details
-
build
Description copied from interface:BuilderBuild the instance from this builder.- Specified by:
buildin interfaceBuilder<EndpointConfig.Builder,EndpointConfig> - Returns:
- instance of the built type
-
customObject
Set or replace a custom object. This object will be provided to security provider. Objects are stored by class, so we can have multiple objects of different classes (e.g. when using multiple authorizers/authenticators). Class of object is defined by security provider.- Type Parameters:
U- Type of the custom object to be stored. The object instance is available ONLY under this classV- Type of instance (must be descendant of U)- Parameters:
objectClass- Class of object as expected by security provideranObject- Custom object to propagate to security provider- Returns:
- updated Builder instance
-
customObjects
Provide custom object map to be sent to security providers.- Parameters:
customObjects- Class to its instance map of custom objects- Returns:
- Updated builder instance
- See Also:
-
config
Provide a configuration for provider to use. This allows a provider to define a custom configuration key.- Parameters:
configKey- key this configuration is stored underconfiguration-configurationstored under the key, as expected by security provider- Returns:
- Updated builder instance
-
configMap
Provider a map of cofiguration keys to configurations for provider(s) to use.- Parameters:
configMap- map of configurations- Returns:
- updated builder instance
-
addAtribute
Add an attribute to this endpoint configuration builder.- Parameters:
key- name of the attribute as expected by the security providervalue- value of this attribute- Returns:
- updated builder instance
-
securityLevels
Sets security levels to this endpoint configuration builder.- Parameters:
securityLevels- list of security levels- Returns:
- updated builder instance
-