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 比这种方法有哪些更好的地方?谁能解释一下吗?
最佳答案
POST 请求参数实际上是 OAuth 2.0 特定的,通常会出现在应用程序层和服务器/应用程序日志中,而 HTTP 基本身份验证是通用的,并且广泛部署在较低的基础设施级别(即系统的 HTTP 堆栈)上,希望有一些围绕它们的安全措施已经到位。
因此,它的值可能会被 HTTP 服务器本身消耗和删除,并防止它爬升到更高级别以及可能不太安全/可信的应用程序及其日志文件。
关于oauth-2.0 - 为什么 Oauth2.0 说 "Client Password in request body not recommended"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44075436/