Class HeaderAtnProvider.Builder

    • Method Detail

      • config

        public HeaderAtnProvider.Builder config​(Config config)
        Load this builder from a configuration.
        Parameters:
        config - configuration to load from
        Returns:
        updated builder instance
      • subjectType

        public HeaderAtnProvider.Builder subjectType​(SubjectType subjectType)
        Principal type this provider extracts (and also propagates).
        Parameters:
        subjectType - type of principal
        Returns:
        updated builder instance
      • propagate

        public HeaderAtnProvider.Builder propagate​(boolean propagate)
        Whether to propagate identity.
        Parameters:
        propagate - whether to propagate identity (true) or not (false)
        Returns:
        updated builder instance
      • authenticate

        public HeaderAtnProvider.Builder authenticate​(boolean authenticate)
        Whether to authenticate requests.
        Parameters:
        authenticate - whether to authenticate (true) or not (false)
        Returns:
        updated builder instance
      • atnTokenHandler

        public HeaderAtnProvider.Builder atnTokenHandler​(TokenHandler tokenHandler)
        Token handler to extract username from request.
        Parameters:
        tokenHandler - token handler instance
        Returns:
        updated builder instance
      • outboundTokenHandler

        public HeaderAtnProvider.Builder outboundTokenHandler​(TokenHandler tokenHandler)
        Token handler to create outbound headers to propagate identity. If not defined, atnTokenHandler will be used.
        Parameters:
        tokenHandler - token handler instance
        Returns:
        updated builder instance
      • optional

        public HeaderAtnProvider.Builder optional​(boolean optional)
        Whether authentication is required. By default, request will fail if the username cannot be extracted. If set to false, request will process and this provider will abstain.
        Parameters:
        optional - whether authentication is optional (true) or required (false)
        Returns:
        updated builder instance
      • addOutboundTarget

        public HeaderAtnProvider.Builder addOutboundTarget​(OutboundTarget target)
        Configure outbound target for identity propagation.
        Parameters:
        target - outbound target
        Returns:
        updated builder instance