【发布时间】:2017-05-03 07:29:26
【问题描述】:
在我的 Spring Boot/OAuth2 应用程序中,我试图通过我自己的 OAuth2 服务器登录用户,并使用以下 url 进行隐式流程:
http://example.com/api/oauth/authorize?response_type=token&client_id=example_client_id&redirect_uri=http%3A%2F%2Flocalhost%3A8080%2Flogin
登录后它将用户重定向到以下网址:
http://localhost:8080/login#access_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoyOTcsInVzZXJfbmFtZSI6ImFkbWluIiwic2NvcGUiOlsicmVh&token_type=bearer&expires_in=43199&scope=read%20write&user_id=297&jti=9d416117-0d08-4f4e-874d-3f31dbe7815f
将用户重定向到带有# 符号而不是? 的url 是否正确。我的意思是:
http://localhost:8080/login?access_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoyOTcsInVzZXJfbmFtZSI6ImFkbWluIiwic2NvcGUiOlsicmVh&token_type=bearer&expires_in=43199&scope=read%20write&user_id=297&jti=9d416117-0d08-4f4e-874d-3f31dbe7815f
如果没有 - 如何设置我的 Spring 应用程序 OAuth2 服务器以便将用户重定向到正确的 url?
【问题讨论】:
标签: java spring spring-boot spring-security oauth2