ash*_*evo 6 spring spring-security spring-oauth2
我收到 OAuth2AuthorizationException:[authorization_request_not_found]
当尝试将授权授予类型从授权代码替换为隐式时
spring:
security:
oauth2:
client:
registration:
mobile:
provider: auth
client-id: revo
authorization-grant-type: implicit
redirect-uri: "{baseUrl}/login/oauth2/code/{registrationId}"
scope: read
Run Code Online (Sandbox Code Playgroud)
结果将我重定向到 /login/oauth2/code/mobile#access_token={++++}&token_type=bearer&state={++++}&expires_in={++++}
根据源码分析,authorization_request_not_found可能是以下原因造成的:
以上内容应保留在ClientRegistrationRepository. 检查客户端和身份验证服务器配置后,第三种可能性是服务器和客户端使用相同的{baseUrl}localhost 或相同的 ip,即使它们位于不同的端口。然后您可以更改其中之一以使用本地配置的域名(例如/etc/host)。这是因为当客户端和服务器都使用相同的域名时,它们会删除对方刚刚在 cookie 中设置的会话 ID。
| 归档时间: |
|
| 查看次数: |
6592 次 |
| 最近记录: |