知识卡片
身份令牌不可代替访问令牌
OIDC 在 OAuth 授权流程之上让客户端取得用户身份信息;ID token 的目标是向客户端说明用户是谁,访问令牌才用于请求受保护 API。资源服务不应把 ID token 当访问令牌接受,否则会混淆受众与授权用途。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- · 查看原书依据
OIDC has its role, providing user identity to clients; however, it does not provide access to APIs. If OIDC is something that you need, then you should be sure that your identity provider has support for it. Do not try to build your own identity layer.
参考来源
- 位置:《Mastering API Architecture》第7章《API Authentication and Authorization》之《Introducing OIDC》(源文件:_epub-src/OEBPS/ch07.xhtml)
- 结论依据:原文明确 OIDC 提供身份层,ID token 包含用户声明但不用于访问资源,并直接警告不可替代访问令牌。
- 原始内容:OIDC has its role, providing user identity to clients; however, it does not provide access to APIs. If OIDC is something that you need, then you should be sure that your identity provider has support for it. Do not try to build your own identity layer.