Ser*_*man 6 java spring spring-mvc spring-boot spring-oauth2
我正在使用Spring OAuth2来启用SoundCloud登录.我已经注册了我的回调网址.因此,当我使用Spring OAuth2并明确设置我的重定向url时,它迫使我手动处理它(通过为它提供一些控制器).
我把它放在application.yml中:
pre-established-redirect-uri: https://localhost:8443/callback
use-current-uri: false
Run Code Online (Sandbox Code Playgroud)
我得到了404:
https://localhost:8443/callback?code=...
Run Code Online (Sandbox Code Playgroud)
我可以强制Spring OAuth2自动获取访问令牌而不处理回调吗?
我认为你必须处理回调才能从声音云 Api 获取访问令牌。Spring-social 有助于在不处理回调的情况下获取访问令牌,但目前仅适用于 Facebook、Twitter 和 LinkedIn。您可以查看有关 Spring Social 的此链接:
http://projects.spring.io/spring-social/core.html
刚刚检查了一下,好像有人试图提供声音云 api 与 spring-social 的绑定。但我怀疑它的完整性。您可以检查此链接来了解一下:
https://github.com/michaellavelle/spring-social-soundcloud
| 归档时间: |
|
| 查看次数: |
1928 次 |
| 最近记录: |