如何实现与OAuth2用户和JavaScript客户端长寿登录会话(春季的oauth2 + Angularjs) [英] How to achieve long lived login session with Oauth2 and javascript client(Spring Oauth2 + Angularjs)
问题描述
我和春天的OAuth2 和角客户端弹簧后端。
I've a spring backend with Spring OAuth2 and Angular client.
什么是实现长寿登录这仍然是争论的安全的正确方法。
What is the proper way to achieve long lived logins which is still arguably secure.
我想我可以使用密码流程和刷新令牌的,但是这似乎并不比使用长寿命更加安全的访问令牌的有隐流程作为浏览器客户端。我想我可以使用:
I guess I can use password flow and refresh tokens, but this doesn't seem any safer than using long lived access tokens with implicit flow for browser clients. I think I can use:
- 的重定向的 - 这将与任何用户在做什么干扰
- 的弹出窗口的 - 这将被封锁,而无需用户交互
- Redirects - which will interfere with whatever user was doing
- Popups - which will get blocked without user interaction
在客户端级别。但是,有没有更好的方法呢?
on the client level. But is there any better approach?
P.S:Cloudfoundry新UI似乎正是我想要的实现。
P.S: Cloudfoundry's new UI seems to have achieved exactly what I want.
推荐答案
解决我是使用隐藏的iframe的隐式授权。
Solution to me was to use hidden iframes with implicit grant.
这篇关于如何实现与OAuth2用户和JavaScript客户端长寿登录会话(春季的oauth2 + Angularjs)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!