![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
OAuth2
qq_44209563
这个作者很懒,什么都没留下…
展开
-
结合Thymeleaf修改Spring Security OAuth2默认的登录页面和授权页面
修改登录页面修改授权页面在授权服务器中新建一个AuthController@Controller@SessionAttributes("authorizationRequest")//必须配置public class AuthController { @RequestMapping("/oauth/confirm_access")//路径必须是这个 public Str...原创 2020-01-10 00:43:00 · 3065 阅读 · 0 评论 -
401 : [{"error":"invalid_client","error_description":"Bad client credentials"}]
问题描述:在使用oauth2时,在第三方应用获取token访问资源服务器的时候,显示错误:HttpClientErrorException$Unauthorized: 401 : [{“error”:“invalid_client”,“error_description”:“Bad client credentials”}]原因在第三方应用使用token来访问资源服务器获取资源的时...原创 2020-01-09 20:00:24 · 23772 阅读 · 1 评论 -
Spring Security OAuth2入门案例
依赖添加pom<dependency> <groupId>org.springframework.security.oauth</groupId> <artifactId>spring-security-oauth2</artifactId> <versio...原创 2020-01-08 21:21:57 · 256 阅读 · 0 评论 -
IllegalArgumentException: There is no PasswordEncoder mapped for the id "null"
在运行oauth2的简单案例时,输入用户名密码后,显示错误:IllegalArgumentException: There is no PasswordEncoder mapped for the id “null”解决方法在web安全配置中加上@Bean public PasswordEncoder passwordEncoder(){ return new ...原创 2020-01-08 20:09:08 · 267 阅读 · 0 评论 -
Spring Security OAuth2基于JDBC存储令牌
步骤1、初始化 oAuth2 相关表建表脚本如下:CREATE TABLE `clientdetails` ( `appId` varchar(128) NOT NULL, `resourceIds` varchar(256) DEFAULT NULL, `appSecret` varchar(256) DEFAULT NULL, `scope` varchar(256) D...原创 2019-12-29 17:51:45 · 1316 阅读 · 0 评论