Class InboundClientDefinition.Builder

    • Method Detail

      • principalName

        public InboundClientDefinition.Builder principalName​(String name)
        The principal name of the client, defaults to keyId if not configured.
        Parameters:
        name - name of security principal
        Returns:
        updated builder instance
      • keyId

        public InboundClientDefinition.Builder keyId​(String keyId)
        The key id of this client to map to this signature validation configuration.
        Parameters:
        keyId - key id as provided in inbound signature
        Returns:
        updated builder instance
      • subjectType

        public InboundClientDefinition.Builder subjectType​(SubjectType type)
        The type of principal we have authenticated (either user or service, defaults to service).
        Parameters:
        type - principal type
        Returns:
        updated builder instance
      • algorithm

        public InboundClientDefinition.Builder algorithm​(String algorithm)
        Algorithm of signature used by this client. Currently supported:
        • rsa-sha256 - asymmetric based on public/private keys
        • hmac-sha256 - symmetric based on a shared secret
        Parameters:
        algorithm - algorithm used
        Returns:
        updated builder instance
      • publicKeyConfig

        public InboundClientDefinition.Builder publicKeyConfig​(KeyConfig keyConfig)
        For algorithms based on public/private key (such as rsa-sha256), this provides access to the public key of the client.
        Parameters:
        keyConfig - keys configured to access a public key to validate signature
        Returns:
        updated builder instance
      • hmacSecret

        public InboundClientDefinition.Builder hmacSecret​(byte[] secret)
        For hmac-sha256 algorithm, this provides access to a secret shared with the client.
        Parameters:
        secret - shared secret to validate signature
        Returns:
        updated builder instance
      • config

        public InboundClientDefinition.Builder config​(Config config)
        Create a builder instance from configuration.
        Parameters:
        config - config instance
        Returns:
        builder instance initialized from config