如何实现与OAuth2用户和JavaScript客户端长寿登录会话(春季的oauth2 + Angularjs) [英] How to achieve long lived login session with Oauth2 and javascript client(Spring Oauth2 + Angularjs)

查看:130
本文介绍了如何实现与OAuth2用户和JavaScript客户端长寿登录会话(春季的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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆