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如何比这种方法更好?有人可以解释一下吗?
答案 0 :(得分:3)
POST请求参数实际上是特定于OAuth 2.0的,并且通常最终会出现在应用程序层和服务器/应用程序日志中,而HTTP基本身份验证是通用的,并且在较低的基础架构级别(即系统的HTTP堆栈)上进行了相当广泛的部署。他们周围的安全措施已经到位。
因此,HTTP服务器本身可以消耗和删除它的值,并防止它爬升到更高级别,可能更不安全/可信的应用程序及其日志文件。