"资源所有者密码流"和"客户端凭据流"之间的区别对我来说似乎不太清楚.前者似乎将密码凭证转发给服务器进行验证,而后者也以某种方式对服务器进行身份验证,但规范没有指定此处使用的方法.此流程是否适用于cookie会话?规范并没有真正提供一个明确的用例.
从OAuth 2.0规范:
+---------+ +---------------+ | | | | | |>--(A)- Client Authentication --->| Authorization | | Client | | Server | | |<--(B)---- Access Token ---------<| | | | | | +---------+ +---------------+ Figure 6: Client Credentials Flow
和
+----------+ | Resource | | Owner | | | +----------+ v | Resource Owner (A) Password Credentials | v +---------+ +---------------+ | |>--(B)---- Resource Owner ------->| | | | Password Credentials | Authorization | | Client | | Server | | |<--(C)---- Access Token ---------<| | | | (w/ Optional Refresh Token) | | +---------+ +---------------+ Figure 5: Resource Owner Password Credentials Flow
user3287829.. 40
客户端凭据流仅需要client_id和client_secret.资源所有者流程需要用户的密码.
客户端凭证流允许应用程序从用户的上下文中获取令牌.