Class OutboundTargetDefinition.Builder
- java.lang.Object
- 
- io.helidon.security.providers.httpsign.OutboundTargetDefinition.Builder
 
- 
- All Implemented Interfaces:
- Builder<OutboundTargetDefinition>,- Supplier<OutboundTargetDefinition>
 - Enclosing class:
- OutboundTargetDefinition
 
 public static final class OutboundTargetDefinition.Builder extends Object implements Builder<OutboundTargetDefinition> Fluent API builder to buildOutboundTargetDefinitioninstances. Callbuild()to create a new instance.
- 
- 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description OutboundTargetDefinition.Builderalgorithm(String algorithm)Algorithm used by this signature.OutboundTargetDefinitionbuild()Build the instance from this builder.OutboundTargetDefinition.Builderconfig(Config config)Update this builder instance from configuration.OutboundTargetDefinition.Builderheader(HttpSignHeader header)Header to store signature in.OutboundTargetDefinition.BuilderhmacSecret(byte[] secret)Shared secret for HMAC based algorithms.OutboundTargetDefinition.BuilderhmacSecret(String secret)Shared secret for HMAC based algorithms.OutboundTargetDefinition.BuilderkeyId(String keyId)Key id of this service (will be mapped by target service to validate signature).OutboundTargetDefinition.BuilderprivateKeyConfig(KeyConfig keyConfig)Private key configuration for RSA based algorithms.OutboundTargetDefinition.BuildersignedHeaders(SignedHeadersConfig config)Configuration of required and "if-present" headers to be signed for this target.
 
- 
- 
- 
Method Detail- 
keyIdpublic OutboundTargetDefinition.Builder keyId(String keyId) Key id of this service (will be mapped by target service to validate signature).- Parameters:
- keyId- key id mapped by target service
- Returns:
- updated builder instance
 
 - 
headerpublic OutboundTargetDefinition.Builder header(HttpSignHeader header) Header to store signature in.- Parameters:
- header- header type
- Returns:
- updated builder instance
 
 - 
algorithmpublic OutboundTargetDefinition.Builder algorithm(String algorithm) Algorithm used by this signature. Set automatically on call to methodsprivateKeyConfig(KeyConfig)andhmacSecret(byte[]).- Parameters:
- algorithm- algorithm to use for outbound signatures
- Returns:
- updated builder instance
 
 - 
privateKeyConfigpublic OutboundTargetDefinition.Builder privateKeyConfig(KeyConfig keyConfig) Private key configuration for RSA based algorithms. If called sets the algorithm to "rsa-sha256". Expects either explicit private key, or keystore and private key alias.- Parameters:
- keyConfig- private key configuration for outbound signatures
- Returns:
- updated builder instance
 
 - 
signedHeaderspublic OutboundTargetDefinition.Builder signedHeaders(SignedHeadersConfig config) Configuration of required and "if-present" headers to be signed for this target. Defaults to the same asHttpSignProvider.Builder.inboundRequiredHeaders(SignedHeadersConfig).- Parameters:
- config- configuration of outbound headers to be signed for each method.
- Returns:
- updated builder instance
 
 - 
hmacSecretpublic OutboundTargetDefinition.Builder hmacSecret(byte[] secret) Shared secret for HMAC based algorithms. Also sets the algorithm to "hmac-sha256"- Parameters:
- secret- secret to sign outgoing requests (symmetric)
- Returns:
- updated builder instance
 
 - 
hmacSecretpublic OutboundTargetDefinition.Builder hmacSecret(String secret) Shared secret for HMAC based algorithms. CallshmacSecret(byte[])getting bytes of the secret string with UTF-8.- Parameters:
- secret- shared secret to sign outgoing requests
- Returns:
- updated builder instance
 
 - 
buildpublic OutboundTargetDefinition build() Description copied from interface:BuilderBuild the instance from this builder.- Specified by:
- buildin interface- Builder<OutboundTargetDefinition>
- Returns:
- instance of the built type
 
 - 
configpublic OutboundTargetDefinition.Builder config(Config config) Update this builder instance from configuration.- Parameters:
- config- config instance
- Returns:
- updated builder instance
 
 
- 
 
-