Class DefaultMessageSecurityMetadataSource

java.lang.Object
org.springframework.security.messaging.access.intercept.DefaultMessageSecurityMetadataSource
All Implemented Interfaces:
org.springframework.aop.framework.AopInfrastructureBean, SecurityMetadataSource, MessageSecurityMetadataSource

@Deprecated public final class DefaultMessageSecurityMetadataSource extends Object implements MessageSecurityMetadataSource
Deprecated.
Use MessageMatcherDelegatingAuthorizationManager instead
A default implementation of MessageSecurityMetadataSource that looks up the ConfigAttribute instances using a MessageMatcher.

Each entry is considered in order. The first entry that matches, the corresponding Collection<ConfigAttribute> is returned.

Since:
4.0
See Also:
  • Constructor Details

    • DefaultMessageSecurityMetadataSource

      public DefaultMessageSecurityMetadataSource(LinkedHashMap<org.springframework.security.messaging.util.matcher.MessageMatcher<?>,Collection<ConfigAttribute>> messageMap)
      Deprecated.
  • Method Details

    • getAttributes

      public Collection<ConfigAttribute> getAttributes(Object object) throws IllegalArgumentException
      Deprecated.
      Description copied from interface: SecurityMetadataSource
      Accesses the ConfigAttributes that apply to a given secure object.
      Specified by:
      getAttributes in interface SecurityMetadataSource
      Parameters:
      object - the object being secured
      Returns:
      the attributes that apply to the passed in secured object. Should return an empty collection if there are no applicable attributes.
      Throws:
      IllegalArgumentException - if the passed object is not of a type supported by the SecurityMetadataSource implementation
    • getAllConfigAttributes

      public Collection<ConfigAttribute> getAllConfigAttributes()
      Deprecated.
      Description copied from interface: SecurityMetadataSource
      If available, returns all of the ConfigAttributes defined by the implementing class.

      This is used by the AbstractSecurityInterceptor to perform startup time validation of each ConfigAttribute configured against it.

      Specified by:
      getAllConfigAttributes in interface SecurityMetadataSource
      Returns:
      the ConfigAttributes or null if unsupported
    • supports

      public boolean supports(Class<?> clazz)
      Deprecated.
      Description copied from interface: SecurityMetadataSource
      Indicates whether the SecurityMetadataSource implementation is able to provide ConfigAttributes for the indicated secure object type.
      Specified by:
      supports in interface SecurityMetadataSource
      Parameters:
      clazz - the class that is being queried
      Returns:
      true if the implementation can process the indicated class