OAuth2.0 隐式授权流程.为什么要使用 url 哈希片段? [英] OAuth2.0 Implicit Grant flow. Why use url hash fragments?

查看:53
本文介绍了OAuth2.0 隐式授权流程.为什么要使用 url 哈希片段?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通过新的 OAuth2.0 规范 (rfc 6749),我看到隐式授予协议工作流使用 Url 哈希片段在授权服务器和公共客户端之间交换access_token".

Going through the new OAuth2.0 Specs ( rfc 6749 ), I see that Implicit Grant protocol workflow uses Url Hash Fragments to exchange the 'access_token' between the Authorisation server and the public client.

参见规格:http://tools.ietf.org/html/rfc6749#section-4.2

不能将授权许可响应作为查询参数"而不是 Url 片段发送,保持流程的其他部分原样吗?

Cannot the Authorisation grant response be send as 'Query Params' instead of the Url fragment, keeping other parts of the flow as it is ?

基本上我无法理解使 OAuth2 规范作者为隐式授权流授权选择 url 哈希片段的限制?

Basically I cannot understand the limitation that made spec authors of OAuth2 chose url hash fragments for Implicit grant flow authorisation ?

推荐答案

隐式授权流程是为 Java 脚本客户端完成的,我认为他们使用的是#"而不是?"不将访问令牌发送到重定向 URL 的服务器端,但它仍然可以访问 javascript,在我们的情况下,这是客户端可能出于安全原因不通过网络共享您的访问令牌可能不安全,就像用于重定向 URL 的令牌一样"

the Implicit Grant flow is done for java script clients and I think they are using '#' instead of '?' to not send the access token to server side of your redirect URL but it is still reach to javascript which is the client in our case may be for security reason "not sharing your access token over network may be unsecured like one used for redirect URL"

这篇关于OAuth2.0 隐式授权流程.为什么要使用 url 哈希片段?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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