public class MessageSecurityMetadataSourceRegistry extends Object
MessageMatcher
to the security expressions.Modifier and Type | Class and Description |
---|---|
class |
MessageSecurityMetadataSourceRegistry.Constraint
Represents the security constraint to be applied to the
MessageMatcher instances. |
Constructor and Description |
---|
MessageSecurityMetadataSourceRegistry() |
public MessageSecurityMetadataSourceRegistry()
public MessageSecurityMetadataSourceRegistry.Constraint anyMessage()
Message
to a security expression.public MessageSecurityMetadataSourceRegistry.Constraint typeMatchers(org.springframework.messaging.simp.SimpMessageType... typesToMatch)
List
of SimpDestinationMessageMatcher
instances.typesToMatch
- the SimpMessageType
instance to match onMessageSecurityMetadataSourceRegistry.Constraint
associated to the matchers.public MessageSecurityMetadataSourceRegistry.Constraint antMatchers(String... patterns)
List
of SimpDestinationMessageMatcher
instances
without regard to the SimpMessageType
. If no destination is found
on the Message, then the Matcher returns false.patterns
- the patterns to create
SimpDestinationMessageMatcher
from. Uses
pathMatcher(PathMatcher)
.MessageSecurityMetadataSourceRegistry.Constraint
that is associated to the
MessageMatcher
MessageSecurityMetadataSourceRegistry#pathMatcher(PathMatcher)}
public MessageSecurityMetadataSourceRegistry.Constraint antMatchers(org.springframework.messaging.simp.SimpMessageType type, String... patterns)
List
of SimpDestinationMessageMatcher
instances.
If no destination is found on the Message, then the Matcher returns
false.type
- the SimpMessageType
to match on. If null, the SimpMessageType
is not considered for matching.patterns
- the patterns to create SimpDestinationMessageMatcher
from. Uses pathMatcher(PathMatcher)
.MessageSecurityMetadataSourceRegistry.Constraint
that is associated to the MessageMatcher
MessageSecurityMetadataSourceRegistry#pathMatcher(PathMatcher)}
public MessageSecurityMetadataSourceRegistry pathMatcher(PathMatcher pathMatcher)
PathMatcher
to be used with the antMatchers(String...)
.
The default is to use the default constructor of AntPathMatcher
.pathMatcher
- the PathMatcher
to use. Cannot be null.MessageSecurityMetadataSourceRegistry
for further customization.public MessageSecurityMetadataSourceRegistry.Constraint matchers(MessageMatcher<?>... matchers)
List
of MessageMatcher
instances to a security expression.matchers
- the MessageMatcher
instances to map.MessageSecurityMetadataSourceRegistry.Constraint
that is associated to the MessageMatcher
instancesprotected MessageSecurityMetadataSource createMetadataSource()
MessageSecurityMetadataSource
.
This is not exposed so as not to confuse users of the API, which should never invoke this method.
MessageSecurityMetadataSource
to useprotected boolean containsMapping()
This is not exposed so as not to confuse users of the API, which should never need to invoke this method.