-
Notifications
You must be signed in to change notification settings - Fork 591
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
无法通过GET获取token #11
Comments
http://localhost:8080/oauth/token?grant_type=password&scope=select&client_id=client_2&client_secret=123456 http://localhost:8080/oauth/token?username=user_1&password=123456&grant_type=password&scope=select&client_id=client_2&client_secret=123456 |
http://localhost:8080/oauth/token?username=user_1&password=123456&grant_type=password&scope=select&client_id=client_2&client_secret=123456 后台报错: |
http://localhost:8080/oauth/token?username=user_1&password=123456&grant_type=password&scope=select&client_id=client_2&client_secret=123456 |
@cel105302 试试不要用 curl,你的请求其实被截断了。我也踩过坑。 |
@pingalive 看看是不是自己redis服务的问题,redis-cli 可不可以连接上 |
@pingalive,谢谢,前段时间已经解决了 |
@lexburner 我本地没有安装redis, 安上就好了 |
Handling error: SerializationException, Cannot deserialize; nested exception is org.springframework.core.serializer.support.SerializationFailedException: Failed to deserialize payload. Is the byte array a result of corresponding serialization for DefaultDeserializer?; nested exception is java.io.InvalidClassException: org.springframework.security.core.authority.SimpleGrantedAuthority; local class incompatible: stream classdesc serialVersionUID = 420, local class serialVersionUID = 500 |
@huang-xuan 这个是因为你前后的 redis 的序列器不一样造成的问题,可能是不同项目的配置不同,也有可能是同一个项目修改了配置,导致 redis 中的数据无法被正常序列化。 |
我用授权码方式,页面返回这个,获取不到token |
授权码模式的 demo 看来有点问题,不止一个人提了 issue,我最近抽空 debug 看下,调通了回复大家。 |
@huang-xuan 授权码模式demo已更新,pull 之后重新看下吧 |
@evilmiracle 项目fork下来,按照文档请求,遇到了同样的错误。我这边看到的原因是:url请求内有空格,主要是&后面多了几个空格 |
@lexburner TokenEndpoint暴露的/oauth/token是GET和POST两种类型,但是GET请求是去检查allowedRequestMethods是否包含GET方法,默认只支持POST方法,具体可以看一下下面的源码。
` |
Add a NoOpPasswordEncoder Bean to your Oauth2Config which extends AuthorizationServerConfigurerAdapter
|
请求链接:
http://localhost:8080/oauth/token?grant_type=password&scope=select&client_id=client_2&client_secret=123456
收到回显
{"error":"invalid_grant","error_description":"坏的凭证"}
使用你的readme提供的
http://localhost:8080/oauth/token?username=user_1&password=123456&grant_type=password&scope=select&client_id=client_2&client_secret=123456
得到回显
{"error":"server_error","error_description":"Internal Server Error"}
这是因为啥原因啊?
The text was updated successfully, but these errors were encountered: