Search in sources :

Example 1 with MessageSecurityMetadataSource

use of org.springframework.security.messaging.access.intercept.MessageSecurityMetadataSource in project spring-security by spring-projects.

the class MessageSecurityMetadataSourceRegistryTests method getAttribute.

private String getAttribute() {
    MessageSecurityMetadataSource source = messages.createMetadataSource();
    Collection<ConfigAttribute> attrs = source.getAttributes(message);
    if (attrs == null) {
        return null;
    }
    assertThat(attrs.size()).isEqualTo(1);
    return attrs.iterator().next().toString();
}
Also used : ConfigAttribute(org.springframework.security.access.ConfigAttribute) MessageSecurityMetadataSource(org.springframework.security.messaging.access.intercept.MessageSecurityMetadataSource)

Aggregations

ConfigAttribute (org.springframework.security.access.ConfigAttribute)1 MessageSecurityMetadataSource (org.springframework.security.messaging.access.intercept.MessageSecurityMetadataSource)1