知识卡片

普通读书笔记卡 · 3512.b

PKCE用校验值绑定授权码

理解等级:中级

PKCE 在授权码流程中,由客户端生成随机 code_verifier,先发送由它导出的 code_challenge;换令牌时再提交原始 verifier,由服务器核对。这样可降低授权码被截获后的兑换风险,公开客户端也不需嵌入固定客户端密钥。

这张卡片看不懂?

已有反馈 · 0 / 10 条

    还没有人提交反馈。

    原书出处

    参考来源

    - 位置:《Microservice APIs》第 11 章《API authorization and authentication》(源文件:_epub-src/OEBPS/Text/11.htm) - 结论依据:原书说明 PKCE 的场景和目的;具体交换顺序按 RFC 7636 校正,原文把 verifier/challenge 所在请求写反。https://www.rfc-editor.org/rfc/rfc7636.html - 原始内容:The Proof of Key for Code Exchange (PKCE, pronounced “pixie”) is an extension of the authorization code flow designed to protect applications whose source code is publicly exposed, such as mobile applications and single-page applications (SPAs ).