Spring boot oauth2 研究第N天 action 2
来源:互联网 发布:klairs淘宝官网 编辑:程序博客网 时间:2024/05/21 17:09
http://localhost:8080/yuyu/oauth/token?grant_type=client_credentials&client_id=trusted-app&client_secret=secret&response_type=code&scope=read&redirect_uri=/resources/user&t=111
感谢上苍,终于解决了
error="invalid_client", error_description="Bad client credentials"
No client with requested id: normal-app
下面是我的搜索之路
1,当然是搜索验证不过
oauth2.0 authorize
没找到,跟源码,找到是这个类,继续搜
AuthorizationEndpoint
这个类是这里产生的
DefaultOAuth2RequestFactory
还是不行,换个思路
oauth2.0 注册 clientId
不行,继续乱搜,其实这里已经接近了,因为就是找到一篇http://blog.csdn.net/buyaore_wo/article/details/48680981,意识到是configure(ClientDetailsServiceConfigurer clients) 这里的问题,http://www.leftso.com/blog/139.html给的源码并没有解决,所以将代码拷贝过来:
@PostConstruct
public void init() {
InMemoryClientDetailsServiceBuilder inMemoryClientDetailsServiceBuilder = new InMemoryClientDetailsServiceBuilder();
// @formatter:off
inMemoryClientDetailsServiceBuilder.
InMemoryClientDetailsService
AuthorizationEndpoint
... 省略
但是还是不起作用,哎,毕竟不熟,继续搜
authorizationserverconfigureradapter 不起作用
WebSecurityConfigurerAdapter AuthorizationServerConfigurerAdapter
authorizationEndpoint
getOAuth2RequestFactory
最后继续跟源码,发现我的低级错误。在
public void configure(ClientDetailsServiceConfigurer clients) throws Exception {
的方法里调用
clients.inMemory().clients(yuyuClientDetailsService);
并没有设置值进去,修改为
clients.withClientDetails(yuyuClientDetailsService);
搞定,眼泪。。。
- Spring boot oauth2 研究第N天 action 2
- Spring cloud oauth2 研究第N天
- Spring Boot OAuth2
- spring-boot oauth2
- Spring boot OAuth2 例子
- Spring Boot and OAuth2翻译
- 利用Spring Boot Oauth2 来熟悉oauth2 之
- Spring boot --Oauth2.0 + 单点登录
- spring boot做OAuth2认证服务端
- spring boot security oauth2 jwt 服务端实现
- 使用Spring boot 快速 搭建 OAuth2 Server
- spring-boot研究二:spring-boot单元测试
- spring boot security oauth2 实现第三方登录
- spring boot + security oauth2 + redis + mongodb 框架搭建
- java编程spring boot security oauth2 jwt完美整合例子
- spring boot security oauth2 jwt完美整合例子-java编程
- 第2章 Spring Boot简介
- Spring Boot Rock'n'Roll
- Android Studio jar、so、library项目依赖
- java求解蚂蚁爬杆问题(面向对象 暴力解法)
- android audio 音量设置分析
- chapter22 高性能之道
- 设计模式之单例模式
- Spring boot oauth2 研究第N天 action 2
- Huffman Codes(30 分)
- tp5异步上传图片到七牛云,就是那么简单
- Python内置类型性能分析--list
- 使用Bootrap和Vue实现仿百度搜索功能
- chapter23 可靠性
- 来玩玩编程纸带打孔编程------最底层的编程
- 10月25号,关于数组的练习
- php中的动态变量含义及示例