Class MessageSecurityMetadataSourceRegistry
java.lang.Object
org.springframework.security.config.annotation.web.messaging.MessageSecurityMetadataSourceRegistry
Deprecated.
Allows mapping security constraints using
MessageMatcher
to the security
expressions.- Since:
- 4.0
-
Nested Class Summary
Modifier and TypeClassDescriptionfinal class
Deprecated.Represents the security constraint to be applied to theMessageMatcher
instances. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Maps anyMessage
to a security expression.protected boolean
Deprecated.Allows determining if a mapping was added.protected MessageSecurityMetadataSource
Deprecated.Allows subclasses to create creating aMessageSecurityMetadataSource
.expressionHandler
(SecurityExpressionHandler<org.springframework.messaging.Message<Object>> expressionHandler) Deprecated.TheSecurityExpressionHandler
to be used.protected boolean
Deprecated.Determines if thesimpDestPathMatcher(PathMatcher)
has been explicitly set.matchers
(MessageMatcher<?>... matchers) Deprecated.Maps aList
ofMessageMatcher
instances to a security expression.Deprecated.Maps anyMessage
that has a null SimpMessageHeaderAccessor destination header (i.e.simpDestMatchers
(String... patterns) Deprecated.simpDestPathMatcher
(org.springframework.util.PathMatcher pathMatcher) Deprecated.ThePathMatcher
to be used with thesimpDestMatchers(String...)
.simpMessageDestMatchers
(String... patterns) Deprecated.simpSubscribeDestMatchers
(String... patterns) Deprecated.simpTypeMatchers
(org.springframework.messaging.simp.SimpMessageType... typesToMatch) Deprecated.Maps aList
ofSimpDestinationMessageMatcher
instances.
-
Constructor Details
-
MessageSecurityMetadataSourceRegistry
public MessageSecurityMetadataSourceRegistry()Deprecated.
-
-
Method Details
-
anyMessage
Deprecated.Maps anyMessage
to a security expression.- Returns:
- the Expression to associate
-
nullDestMatcher
Deprecated.Maps anyMessage
that has a null SimpMessageHeaderAccessor destination header (i.e. CONNECT, CONNECT_ACK, HEARTBEAT, UNSUBSCRIBE, DISCONNECT, DISCONNECT_ACK, OTHER)- Returns:
- the Expression to associate
-
simpTypeMatchers
public MessageSecurityMetadataSourceRegistry.Constraint simpTypeMatchers(org.springframework.messaging.simp.SimpMessageType... typesToMatch) Deprecated.Maps aList
ofSimpDestinationMessageMatcher
instances.- Parameters:
typesToMatch
- theSimpMessageType
instance to match on- Returns:
- the
MessageSecurityMetadataSourceRegistry.Constraint
associated to the matchers.
-
simpDestMatchers
Deprecated.Maps aList
ofSimpDestinationMessageMatcher
instances without regard to theSimpMessageType
. If no destination is found on the Message, then the Matcher returns false.- Parameters:
patterns
- the patterns to createSimpDestinationMessageMatcher
from. UsessimpDestPathMatcher(PathMatcher)
.- Returns:
- the
MessageSecurityMetadataSourceRegistry.Constraint
that is associated to theMessageMatcher
- See Also:
-
simpMessageDestMatchers
Deprecated.Maps aList
ofSimpDestinationMessageMatcher
instances that match onSimpMessageType.MESSAGE
. If no destination is found on the Message, then the Matcher returns false.- Parameters:
patterns
- the patterns to createSimpDestinationMessageMatcher
from. UsessimpDestPathMatcher(PathMatcher)
.- Returns:
- the
MessageSecurityMetadataSourceRegistry.Constraint
that is associated to theMessageMatcher
- See Also:
-
simpSubscribeDestMatchers
public MessageSecurityMetadataSourceRegistry.Constraint simpSubscribeDestMatchers(String... patterns) Deprecated.Maps aList
ofSimpDestinationMessageMatcher
instances that match onSimpMessageType.SUBSCRIBE
. If no destination is found on the Message, then the Matcher returns false.- Parameters:
patterns
- the patterns to createSimpDestinationMessageMatcher
from. UsessimpDestPathMatcher(PathMatcher)
.- Returns:
- the
MessageSecurityMetadataSourceRegistry.Constraint
that is associated to theMessageMatcher
- See Also:
-
simpDestPathMatcher
public MessageSecurityMetadataSourceRegistry simpDestPathMatcher(org.springframework.util.PathMatcher pathMatcher) Deprecated.ThePathMatcher
to be used with thesimpDestMatchers(String...)
. The default is to use the default constructor ofAntPathMatcher
.- Parameters:
pathMatcher
- thePathMatcher
to use. Cannot be null.- Returns:
- the
MessageSecurityMetadataSourceRegistry
for further customization.
-
isSimpDestPathMatcherConfigured
protected boolean isSimpDestPathMatcherConfigured()Deprecated.Determines if thesimpDestPathMatcher(PathMatcher)
has been explicitly set.- Returns:
- true if
simpDestPathMatcher(PathMatcher)
has been explicitly set, else false.
-
matchers
Deprecated.Maps aList
ofMessageMatcher
instances to a security expression.- Parameters:
matchers
- theMessageMatcher
instances to map.- Returns:
- The
MessageSecurityMetadataSourceRegistry.Constraint
that is associated to theMessageMatcher
instances
-
expressionHandler
public MessageSecurityMetadataSourceRegistry expressionHandler(SecurityExpressionHandler<org.springframework.messaging.Message<Object>> expressionHandler) Deprecated.TheSecurityExpressionHandler
to be used. The default is to useDefaultMessageSecurityExpressionHandler
.- Parameters:
expressionHandler
- theSecurityExpressionHandler
to use. Cannot be null.- Returns:
- the
MessageSecurityMetadataSourceRegistry
for further customization.
-
createMetadataSource
Deprecated.Allows subclasses to create creating aMessageSecurityMetadataSource
.This is not exposed so as not to confuse users of the API, which should never invoke this method.
- Returns:
- the
MessageSecurityMetadataSource
to use
-
containsMapping
protected boolean containsMapping()Deprecated.Allows determining if a mapping was added.This is not exposed so as not to confuse users of the API, which should never need to invoke this method.
- Returns:
- true if a mapping was added, else false
-
MessageMatcherDelegatingAuthorizationManager
instead