Module io.helidon.security
Package io.helidon.security
Class SecurityRequestBuilder<T extends SecurityRequestBuilder<T>>
java.lang.Object
io.helidon.security.SecurityRequestBuilder<T>
- Type Parameters:
T
- Type of the builder, used to enable extensibility of this builder
- Direct Known Subclasses:
OutboundSecurityClientBuilder
,SecurityClientBuilder
Fluent API to build a security request.
-
Method Summary
Modifier and TypeMethodDescriptionBuild the security request.explicitProvider
(String providerName) Use an explicit provider.Put object to this request.Bind object to a specific name.Bind object supplier to a specific name.Put object supplier to this request.optional
(boolean optional) Set that security is optional.tracingSpan
(SpanContext spanContext) Tracing span to support Open tracing.
-
Method Details
-
object
Put object to this request. Creates a default mapping to name "object".- Parameters:
resource
- resource instance to be available to security provider- Returns:
- updated builder instance
-
object
Put object supplier to this request. Creates a default mapping to name "object".- Parameters:
resource
- supplier of resource instance to be available to security provider- Returns:
- updated builder instance
-
object
Bind object to a specific name. Example: a security policy for move operation expects source object bound to "object" and target object bound to "target" you could achieve this by callingobject(sourceInstance)
to bind the "object" part of the statement andobject("target", targetInstance)
to bind the "target" part of the statement- Parameters:
key
- key to bind this object underobject
- resource instance- Returns:
- updated builder instance
-
object
Bind object supplier to a specific name. Example: a security policy for move operation expects source object bound to "object" and target object bound to "target" you could achieve this by callingobject(sourceInstance)
to bind the "object" part of the statement andobject("target", targetInstance)
to bind the "target" part of the statement- Parameters:
key
- key to bind this object underobject
- supplier of resource instance- Returns:
- updated builder instance
-
tracingSpan
Tracing span to support Open tracing. Provider developer can add additional spans as children of this span to trace their progress.- Parameters:
spanContext
- span of current security request (e.g. authentication, authorization or outbound, or any parent if these are not traced)- Returns:
- updated builder instance
- See Also:
-
explicitProvider
Use an explicit provider.- Parameters:
providerName
- Name of a configuredSecurityProvider
- Returns:
- updated request builder instance
-
optional
Set that security is optional. Required is default.- Parameters:
optional
- set to true to make this security request optional- Returns:
- this instance
-
buildRequest
Build the security request. Not using name "build" on purpose, so overriding classes can build their expected type.- Returns:
- Security request built from this builder.
-