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)
        objectClass - Class of object as expected by security provider
        anObject - Custom object to propagate to security provider
        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.
        configKey - key this configuration is stored under
        configuration - configuration stored under the key, as expected by security provider
        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.
        configMap - map of configurations
        updated builder instance
      • addAtribute

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

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