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() |
| Modifier and Type | Method and Description |
|---|---|
MessageSecurityMetadataSourceRegistry.Constraint |
antMatchers(org.springframework.messaging.simp.SimpMessageType type,
String... patterns)
Maps a
List of SimpDestinationMessageMatcher instances. |
MessageSecurityMetadataSourceRegistry.Constraint |
antMatchers(String... patterns)
|
MessageSecurityMetadataSourceRegistry.Constraint |
anyMessage()
Maps any
Message to a security expression. |
protected boolean |
containsMapping()
Allows determining if a mapping was added.
|
protected org.springframework.security.messaging.access.intercept.MessageSecurityMetadataSource |
createMetadataSource()
Allows subclasses to create creating a
MessageSecurityMetadataSource. |
MessageSecurityMetadataSourceRegistry.Constraint |
matchers(org.springframework.security.messaging.util.matcher.MessageMatcher<?>... matchers)
Maps a
List of MessageMatcher instances to a security expression. |
MessageSecurityMetadataSourceRegistry |
pathMatcher(PathMatcher pathMatcher)
The
PathMatcher to be used with the antMatchers(String...). |
MessageSecurityMetadataSourceRegistry.Constraint |
typeMatchers(org.springframework.messaging.simp.SimpMessageType... typesToMatch)
Maps a
List of SimpDestinationMessageMatcher instances. |
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
MessageMatcherMessageSecurityMetadataSourceRegistry#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 MessageMatcherMessageSecurityMetadataSourceRegistry#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(org.springframework.security.messaging.util.matcher.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 org.springframework.security.messaging.access.intercept.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.