本文整理汇总了Java中org.springframework.security.web.SecurityFilterChain.getFilters方法的典型用法代码示例。如果您正苦于以下问题:Java SecurityFilterChain.getFilters方法的具体用法?Java SecurityFilterChain.getFilters怎么用?Java SecurityFilterChain.getFilters使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.springframework.security.web.SecurityFilterChain
的用法示例。
在下文中一共展示了SecurityFilterChain.getFilters方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: postProcessAfterInitialization
import org.springframework.security.web.SecurityFilterChain; //导入方法依赖的package包/类
@Override
public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
if (bean instanceof FilterChainProxy) {
FilterChainProxy chains = (FilterChainProxy) bean;
for (SecurityFilterChain chain : chains.getFilterChains()) {
for (Filter filter : chain.getFilters()) {
if (filter instanceof OAuth2ClientAuthenticationProcessingFilter) {
OAuth2ClientAuthenticationProcessingFilter oAuth2ClientAuthenticationProcessingFilter =
(OAuth2ClientAuthenticationProcessingFilter) filter;
oAuth2ClientAuthenticationProcessingFilter
.setAuthenticationSuccessHandler(new OAuth2AuthenticationSuccessHandler());
}
}
}
}
return bean;
}
示例2: modifyLink
import org.springframework.security.web.SecurityFilterChain; //导入方法依赖的package包/类
@Override
@SuppressWarnings("unchecked")
public <F extends Filter> void modifyLink(SecurityFilterChain filterChain, Class<F> filterType, Modifier<F> modifier) {
for (Filter filter : filterChain.getFilters()) {
if (filterType.isAssignableFrom(filter.getClass())) {
modifier.modify((F) filter);
}
}
}
开发者ID:shiver-me-timbers,项目名称:smt-spring-security-parent,代码行数:10,代码来源:SecurityFilterChainModifier.java
示例3: addBefore
import org.springframework.security.web.SecurityFilterChain; //导入方法依赖的package包/类
@Override
public void addBefore(SecurityFilterChain filterChain, Class<? extends Filter> filterClass, Filter filter) {
final List<Filter> filters = filterChain.getFilters();
final int index = findFirstIndexOf(filterClass, filters);
if (index >= 0) {
filters.add(index, filter);
}
}
开发者ID:shiver-me-timbers,项目名称:smt-spring-security-parent,代码行数:9,代码来源:SecurityFilterChainModifier.java
示例4: registerSpringSecurityFilters
import org.springframework.security.web.SecurityFilterChain; //导入方法依赖的package包/类
protected void registerSpringSecurityFilters(Environment environment) {
SecurityFilterChain filterChain = context.getBean(SecurityFilterChain.class);
for (Filter filter : filterChain.getFilters()) {
environment.addFilter(filter, "/*");
}
}