Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
323 views
in Technique[技术] by (71.8m points)

过滤掉不需要token验证的url

springboot 项目中,使用oauth2方式验证有效性,资源服务器和认证服务器分开了,在HttpSecurity中配置的过滤器:

protected void configure(HttpSecurity http) throws Exception {
        http.authorizeRequests().antMatchers("不需要认证的资源路劲").permitAll();
}

以上配置在浏览器中或者postman直接不登录测试,返回没有认证。
请问各位程序猿大佬,有什么办法可以让这类资源不用验证token直接访问呢?
也试过拦截器,没成功。如果您有任何成功案例可以指点下吗?谢谢您~不胜感激


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神解答

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share

2.1m questions

2.1m answers

63 comments

56.6k users

...