Class OutboundTargetDefinition.Builder

    • Method Detail

      • keyId

        public 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
      • privateKeyConfig

        public 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
      • hmacSecret

        public 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
      • hmacSecret

        public OutboundTargetDefinition.Builder hmacSecret​(String secret)
        Shared secret for HMAC based algorithms. Calls hmacSecret(byte[]) getting bytes of the secret string with UTF-8.
        Parameters:
        secret - shared secret to sign outgoing requests
        Returns:
        updated builder instance
      • tokenHandler

        public OutboundTargetDefinition.Builder tokenHandler​(TokenHandler tokenHandler)
        Configure a token handler to create the outbound header.
        Parameters:
        tokenHandler - token handler to use
        Returns:
        updated builder instance
      • config

        public OutboundTargetDefinition.Builder config​(Config config)
        Update this builder instance from configuration.
        Parameters:
        config - config instance
        Returns:
        updated builder instance
      • backwardCompatibleEol

        public OutboundTargetDefinition.Builder backwardCompatibleEol​(Boolean backwardCompatible)
        Until version 3.0.0 (exclusive) there is a trailing end of line added to the signed data. When configured to false, the correct approach is used.
        Parameters:
        backwardCompatible - whether to run in backward compatible mode
        Returns:
        updated builder instance