Class EndpointConfig.Builder

    • Method Detail

      • customObject

        public <U,​V extends U> EndpointConfig.Builder customObject​(Class<U> objectClass,
                                                                         V anObject)
        Set or replace a custom object. This object will be provided to security provider. Objects are stored by class, so we can have multiple objects of different classes (e.g. when using multiple authorizers/authenticators). Class of object is defined by security provider.
        Type Parameters:
        U - Type of the custom object to be stored. The object instance is available ONLY under this class
        V - Type of instance (must be descendant of U)
        Parameters:
        objectClass - Class of object as expected by security provider
        anObject - Custom object to propagate to security provider
        Returns:
        updated Builder instance
      • config

        public EndpointConfig.Builder config​(String configKey,
                                             Config configuration)
        Provide a configuration for provider to use. This allows a provider to define a custom configuration key.
        Parameters:
        configKey - key this configuration is stored under
        configuration - configuration stored under the key, as expected by security provider
        Returns:
        Updated builder instance
      • configMap

        public EndpointConfig.Builder configMap​(Map<String,​Config> configMap)
        Provider a map of cofiguration keys to configurations for provider(s) to use.
        Parameters:
        configMap - map of configurations
        Returns:
        updated builder instance
      • addAtribute

        public EndpointConfig.Builder addAtribute​(String key,
                                                  Object value)
        Add an attribute to this endpoint configuration builder.
        Parameters:
        key - name of the attribute as expected by the security provider
        value - value of this attribute
        Returns:
        updated builder instance
      • securityLevels

        public EndpointConfig.Builder securityLevels​(List<SecurityLevel> securityLevels)
        Sets security levels to this endpoint configuration builder.
        Parameters:
        securityLevels - list of security levels
        Returns:
        updated builder instance