Java Code Examples for org.springframework.security.web.access.intercept.FilterInvocationSecurityMetadataSource

The following examples show how to use org.springframework.security.web.access.intercept.FilterInvocationSecurityMetadataSource. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: lemon   Source File: TestUrlResourcePopulator.java    License: Apache License 2.0 6 votes vote down vote up
public void execute(Map<String, String> resourceMap) {
    Assert.notNull(filterSecurityInterceptor);
    Assert.notNull(resourceMap);

    logger.info("refresh url resource");

    LinkedHashMap<RequestMatcher, Collection<ConfigAttribute>> requestMap = null;
    requestMap = new LinkedHashMap<RequestMatcher, Collection<ConfigAttribute>>();

    for (Map.Entry<String, String> entry : resourceMap.entrySet()) {
        String key = entry.getKey();
        String value = entry.getValue();
        requestMap.put(new AntPathRequestMatcher(key),
                SecurityConfig.createListFromCommaDelimitedString(value));
    }

    FilterInvocationSecurityMetadataSource source = new DefaultFilterInvocationSecurityMetadataSource(
            requestMap);
    filterSecurityInterceptor.setSecurityMetadataSource(source);
}
 
Example 2
Source Project: lemon   Source File: UrlResourcePopulator.java    License: Apache License 2.0 6 votes vote down vote up
public void execute(FilterSecurityInterceptor filterSecurityInterceptor,
        Map<String, String> resourceMap) {
    Assert.notNull(filterSecurityInterceptor);
    Assert.notNull(resourceMap);

    logger.info("refresh url resource");

    LinkedHashMap<RequestMatcher, Collection<ConfigAttribute>> requestMap = null;
    requestMap = new LinkedHashMap<RequestMatcher, Collection<ConfigAttribute>>();

    for (Map.Entry<String, String> entry : resourceMap.entrySet()) {
        String key = entry.getKey();
        String value = entry.getValue();
        requestMap.put(new AntPathRequestMatcher(key),
                SecurityConfig.createListFromCommaDelimitedString(value));
    }

    FilterInvocationSecurityMetadataSource source = new DefaultFilterInvocationSecurityMetadataSource(
            requestMap);
    filterSecurityInterceptor.setSecurityMetadataSource(source);
}
 
Example 3
Source Project: lemon   Source File: UrlSourceBuilder.java    License: Apache License 2.0 5 votes vote down vote up
public void refresh() {
    if ((filterSecurityInterceptor == null) || (urlSourceFetcher == null)) {
        logger.info(
                "filterSecurityInterceptor : {}, urlSourceFetcher : {}",
                filterSecurityInterceptor, urlSourceFetcher);

        return;
    }

    logger.info("execute refresh");

    Map<String, String> resourceMap = urlSourceFetcher.getSource(null);

    LinkedHashMap<RequestMatcher, Collection<ConfigAttribute>> requestMap = null;
    requestMap = new LinkedHashMap<RequestMatcher, Collection<ConfigAttribute>>();

    for (Map.Entry<String, String> entry : resourceMap.entrySet()) {
        String key = entry.getKey();
        String value = entry.getValue();
        requestMap.put(new AntPathRequestMatcher(key),
                SecurityConfig.createListFromCommaDelimitedString(value));
    }

    FilterInvocationSecurityMetadataSource source = new DefaultFilterInvocationSecurityMetadataSource(
            requestMap);
    filterSecurityInterceptor.setSecurityMetadataSource(source);
}
 
Example 4
Source Project: base-admin   Source File: DynamicallyUrlInterceptor.java    License: MIT License 4 votes vote down vote up
public FilterInvocationSecurityMetadataSource getSecurityMetadataSource() {
    return this.securityMetadataSource;
}
 
Example 5
Source Project: base-admin   Source File: DynamicallyUrlInterceptor.java    License: MIT License 4 votes vote down vote up
public void setSecurityMetadataSource(FilterInvocationSecurityMetadataSource newSource) {
    this.securityMetadataSource = newSource;
}
 
Example 6
public FilterInvocationSecurityMetadataSource getSecurityMetadataSource(){
	return this.securityMetadataSource;
}
 
Example 7
public void setSecurityMetadataSource(FilterInvocationSecurityMetadataSource securityMetadataSource){
	this.securityMetadataSource = securityMetadataSource;
}
 
Example 8
public ExpressionFilterInvocationSecurityMetadataSource(FilterInvocationSecurityMetadataSource expressionBasedFilterInvocationSecurityMetadataSource, ResourceEntityMapper resourceEntityMapper) {
    this.hardCodedSecurityMetadataSource = expressionBasedFilterInvocationSecurityMetadataSource;
    this.resourceEntityMapper = resourceEntityMapper;
}
 
Example 9
Source Project: bdf3   Source File: FilterSecurityInterceptor.java    License: Apache License 2.0 4 votes vote down vote up
public FilterInvocationSecurityMetadataSource getSecurityMetadataSource() {
	return this.securityMetadataSource;
}
 
Example 10
Source Project: bdf3   Source File: FilterSecurityInterceptor.java    License: Apache License 2.0 4 votes vote down vote up
public void setSecurityMetadataSource(FilterInvocationSecurityMetadataSource newSource) {
	this.securityMetadataSource = newSource;
}
 
Example 11
Source Project: zxl   Source File: ResourceSecurityFilter.java    License: Apache License 2.0 4 votes vote down vote up
public FilterInvocationSecurityMetadataSource getSecurityMetadataSource() {
	return this.securityMetadataSource;
}
 
Example 12
Source Project: zxl   Source File: ResourceSecurityFilter.java    License: Apache License 2.0 4 votes vote down vote up
public void setSecurityMetadataSource(FilterInvocationSecurityMetadataSource newSource) {
	this.securityMetadataSource = newSource;
}