hengboy / spring-cloud-chapter

Spring Cloud Enterprise Core Technology, Corresponding to the Special Subject Source of the Brief Book "Spring Cloud Core Technology"
14 stars 6 forks source link

原来SpringSecurity整合OAuth2后开放权限拦截路径还能这么玩? - 程序员 - 恒宇少年 | SpringBoot | SpringCloud | Java - 个人博客 #177

Open hengboy opened 4 years ago

hengboy commented 4 years ago

http://blog.yuqiyu.com/apiboot-security-open-paths-without-intercept.html

当我们整合了Spring Security以及OAuth2后发现,有一些业务请求是需要开放的,因为种种原因这时访问者还没有身份标识(比如:用户刚来,还没有注册,需要进行新用户注册,这时注册业务相关的接口都应该是开放的),下面我们来看看ApiBoot是怎么排除路径不进行权限拦截的。