为什么Oauth2.0说“请求机构中的客户密码不推荐”?

时间:2017-05-19 17:03:22

标签: oauth-2.0 google-oauth facebook-login azure-active-directory google-oauth2

Client authentication of oauth spec indicates the following in section 2.3.1:

   Including the client credentials in the request-body using the two
   parameters is NOT RECOMMENDED and SHOULD be limited to clients unable
   to directly utilize the HTTP Basic authentication scheme (or other
   password-based HTTP authentication schemes).

我不明白为什么不建议这样做。 Http Basic Auth如何比这种方法更好?有人可以解释一下吗?

1 个答案:

答案 0 :(得分:3)

POST请求参数实际上是特定于OAuth 2.0的,并且通常最终会出现在应用程序层和服务器/应用程序日志中,而HTTP基本身份验证是通用的,并且在较低的基础架构级别(即系统的HTTP堆栈)上进行了相当广泛的部署。他们周围的安全措施已经到位。

因此,HTTP服务器本身可以消耗和删除它的值,并防止它爬升到更高级别,可能更不安全/可信的应用程序及其日志文件。