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
Nested ClassesModifier and TypeClassDescriptionfinal classDeprecated.Represents the security constraint to be applied to theMessageMatcherinstances. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Maps anyMessageto a security expression.protected booleanDeprecated.Allows determining if a mapping was added.protected MessageSecurityMetadataSourceDeprecated.Allows subclasses to create creating aMessageSecurityMetadataSource.expressionHandler(SecurityExpressionHandler<org.springframework.messaging.Message<Object>> expressionHandler) Deprecated.TheSecurityExpressionHandlerto be used.protected booleanDeprecated.Determines if thesimpDestPathMatcher(PathMatcher)has been explicitly set.matchers(MessageMatcher<?>... matchers) Deprecated.Maps aListofMessageMatcherinstances to a security expression.Deprecated.Maps anyMessagethat has a null SimpMessageHeaderAccessor destination header (i.e.simpDestMatchers(String... patterns) Deprecated.simpDestPathMatcher(org.springframework.util.PathMatcher pathMatcher) Deprecated.ThePathMatcherto be used with thesimpDestMatchers(String...).simpMessageDestMatchers(String... patterns) Deprecated.simpSubscribeDestMatchers(String... patterns) Deprecated.simpTypeMatchers(org.springframework.messaging.simp.SimpMessageType... typesToMatch) Deprecated.Maps aListofSimpDestinationMessageMatcherinstances.
-
Constructor Details
-
MessageSecurityMetadataSourceRegistry
public MessageSecurityMetadataSourceRegistry()Deprecated.
-
-
Method Details
-
anyMessage
Deprecated.Maps anyMessageto a security expression.- Returns:
- the Expression to associate
-
nullDestMatcher
Deprecated.Maps anyMessagethat 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 aListofSimpDestinationMessageMatcherinstances.- Parameters:
typesToMatch- theSimpMessageTypeinstance to match on- Returns:
- the
MessageSecurityMetadataSourceRegistry.Constraintassociated to the matchers.
-
simpDestMatchers
Deprecated.Maps aListofSimpDestinationMessageMatcherinstances without regard to theSimpMessageType. If no destination is found on the Message, then the Matcher returns false.- Parameters:
patterns- the patterns to createSimpDestinationMessageMatcherfrom. UsessimpDestPathMatcher(PathMatcher).- Returns:
- the
MessageSecurityMetadataSourceRegistry.Constraintthat is associated to theMessageMatcher - See Also:
-
simpMessageDestMatchers
Deprecated.Maps aListofSimpDestinationMessageMatcherinstances that match onSimpMessageType.MESSAGE. If no destination is found on the Message, then the Matcher returns false.- Parameters:
patterns- the patterns to createSimpDestinationMessageMatcherfrom. UsessimpDestPathMatcher(PathMatcher).- Returns:
- the
MessageSecurityMetadataSourceRegistry.Constraintthat is associated to theMessageMatcher - See Also:
-
simpSubscribeDestMatchers
public MessageSecurityMetadataSourceRegistry.Constraint simpSubscribeDestMatchers(String... patterns) Deprecated.Maps aListofSimpDestinationMessageMatcherinstances that match onSimpMessageType.SUBSCRIBE. If no destination is found on the Message, then the Matcher returns false.- Parameters:
patterns- the patterns to createSimpDestinationMessageMatcherfrom. UsessimpDestPathMatcher(PathMatcher).- Returns:
- the
MessageSecurityMetadataSourceRegistry.Constraintthat is associated to theMessageMatcher - See Also:
-
simpDestPathMatcher
public MessageSecurityMetadataSourceRegistry simpDestPathMatcher(org.springframework.util.PathMatcher pathMatcher) Deprecated.ThePathMatcherto be used with thesimpDestMatchers(String...). The default is to use the default constructor ofAntPathMatcher.- Parameters:
pathMatcher- thePathMatcherto use. Cannot be null.- Returns:
- the
MessageSecurityMetadataSourceRegistryfor 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 aListofMessageMatcherinstances to a security expression.- Parameters:
matchers- theMessageMatcherinstances to map.- Returns:
- The
MessageSecurityMetadataSourceRegistry.Constraintthat is associated to theMessageMatcherinstances
-
expressionHandler
public MessageSecurityMetadataSourceRegistry expressionHandler(SecurityExpressionHandler<org.springframework.messaging.Message<Object>> expressionHandler) Deprecated.TheSecurityExpressionHandlerto be used. The default is to useDefaultMessageSecurityExpressionHandler.- Parameters:
expressionHandler- theSecurityExpressionHandlerto use. Cannot be null.- Returns:
- the
MessageSecurityMetadataSourceRegistryfor 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
MessageSecurityMetadataSourceto 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
-
MessageMatcherDelegatingAuthorizationManagerinstead