resttemplate带授权码请求我的github登录接口/auth/github报错,401
来源:6-6 重构社交登录
他门说这就是人生
2019-09-03
Full authentication is required to access this resource
unauthorized
/auth/github已经暴露:
@Component
public class SecurityConfigerAdapter extends WebSecurityConfigurerAdapter {
@Override
public void configure(WebSecurity web) throws Exception {
web.ignoring()
// swagger2文档
.antMatchers("/swagger-ui.html")
.antMatchers("/webjars/**")
.antMatchers("/v2/**")
.antMatchers("/swagger-resources/**")
// 验证码
.antMatchers(UrlConstants.CAPTCHA_URL, "/login/**", "/auth/github");
}
}
请大家不吝赐教
写回答
1回答
-
/auth/github 这后面写了啥?你在这个配置里忽略了认证和权限,但是不代表你这个请求的处理逻辑中不需要用户信息啊。
012019-09-03
Spring Security技术栈开发企业级认证与授权
Spring Security技术栈,REST风格开发常见接口,独立开发认证授权模块保证REST服务安全
2662 学习 · 1561 问题
相似问题