Class EndpointConfig

All Implemented Interfaces:

public class EndpointConfig extends Object implements AbacSupport
Each endpoint can have security configuration either statically declared (e.g. annotations) or dynamically provided through manual security request. This class covers all kinds of configurations supported:
  • Annotations as gathered by the integration component (e.g. from Jersey resource class and method)
  • Configuration as read from a configuration resource (e.g. when integrating web server)
  • Attributes (key/value) configured by a programmer
  • Custom objects configured by a programmer
Each provider defines annotations, configuration keys, attributes and custom objects it supports and expects.
See Also:
  • Field Details


      public static final String PROPERTY_OUTBOUND_ID
      Configure this for outbound requests to override id to use (client id, user - depending on use case). This is supported for example for HTTP Basic authentication and JWT authentication providers.
      See Also:

      public static final String PROPERTY_OUTBOUND_SECRET
      Configure this for outbound requests to override secret to use (client secret, actual password - depending on use case). This is supported for example for HTTP Basic authentication provider.
      See Also:
  • Method Details

    • builder

      public static EndpointConfig.Builder builder()
      Creates a fluent API builder to build new instances of this class.
      a builder instance
    • create

      public static EndpointConfig create()
      Create an instance of endpoint config with default values (e.g. all empty).
      endpoint config instance
    • abacAttributeRaw

      public Object abacAttributeRaw(String key)
      Description copied from interface: AbacSupport
      Return the actual property value or null if not present. This is the only method that needs to be implemented.
      Specified by:
      abacAttributeRaw in interface AbacSupport
      key - key (name) of the property
      value of the property or null
    • abacAttributeNames

      public Collection<String> abacAttributeNames()
      Description copied from interface: AbacSupport
      A collection of all property names in this container.
      Specified by:
      abacAttributeNames in interface AbacSupport
      collection of keys
    • instance

      public <U> Optional<U> instance(Class<U> clazz)
      Get an instance of a custom object configuring this endpoint.
      Type Parameters:
      U - type of the configuration
      clazz - class the instance is bound under (only explicit binding is supported)
      instance of the custom object if present
    • instanceKeys

      public Collection<Class<?>> instanceKeys()
      Get all classes of custom endpoint configuration object registered.
      classes that are keys in the custom object store
    • config

      public Optional<Config> config(String configKey)
      Get Config instance for a config key.
      configKey - key of configuration expected
      Config instance if present in this endpoint configuration
    • securityLevels

      public List<SecurityLevel> securityLevels()
      Get all security levels endpoint configuration object registered. The first level represents EndpointConfig.AnnotationScope.APPLICATION level annotations. Other levels are representations of each resource and method used on path to get to the target method.
      all registered security levels
    • derive

      public EndpointConfig.Builder derive()
      Derive a new endpoint configuration builder based on this instance.
      builder to build a modified copy of this endpoint config