知识卡片
委托授权不交出用户密码
第三方应用要代表用户调用 API 时,应由用户对访问范围作出允许或拒绝,再由授权服务给应用发访问令牌。这样资源服务接收的是受限授权,而第三方无需持有用户密码。授权流程仍须按客户端类型选合适方式。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- · 查看原书依据
OAuth2 allows a user to consent that a third-party application can access their data on their behalf. The consent that the user gives is the authorization—they are allowing or denying the access. OAuth2 removes the need for a user to hand over their credentials to the third party, which gives the user control over their data.
参考来源
- 位置:《Mastering API Architecture》第7章《API Authentication and Authorization》之《OAuth2》《Terminology and Mechanisms of OAuth2 Grants》(源文件:_epub-src/OEBPS/ch07.xhtml)
- 结论依据:原文说明 OAuth2 让用户同意第三方代表自己访问数据,无需交出凭证,并描述资源拥有者、客户端、授权服务器与资源服务器的令牌交互。
- 原始内容:OAuth2 allows a user to consent that a third-party application can access their data on their behalf. The consent that the user gives is the authorization—they are allowing or denying the access. OAuth2 removes the need for a user to hand over their credentials to the third party, which gives the user control over their data.