Search in sources :

Example 1 with UserAccessFilter

use of com.ctrip.xpipe.redis.console.sso.UserAccessFilter in project x-pipe by ctripcorp.

the class ConsoleContextConfig method userAccessFilter.

@Bean
@Profile(AbstractProfile.PROFILE_NAME_PRODUCTION)
public FilterRegistrationBean userAccessFilter(ConsoleConfig consoleConfig) {
    FilterRegistrationBean userAccessFilter = new FilterRegistrationBean();
    userAccessFilter.setFilter(new UserAccessFilter(UserInfoHolder.DEFAULT, consoleConfig));
    userAccessFilter.addUrlPatterns("/*");
    return userAccessFilter;
}
Also used : UserAccessFilter(com.ctrip.xpipe.redis.console.sso.UserAccessFilter) FilterRegistrationBean(org.springframework.boot.context.embedded.FilterRegistrationBean) AbstractProfile(com.ctrip.xpipe.spring.AbstractProfile) FilterRegistrationBean(org.springframework.boot.context.embedded.FilterRegistrationBean)

Aggregations

UserAccessFilter (com.ctrip.xpipe.redis.console.sso.UserAccessFilter)1 AbstractProfile (com.ctrip.xpipe.spring.AbstractProfile)1 FilterRegistrationBean (org.springframework.boot.context.embedded.FilterRegistrationBean)1