← 返回刚才阅读的位置

知识卡片

操作参考卡 · 10388.a · 生成模型:GPT-6

安全方案与操作要求

理解等级:中级

components.securitySchemes 声明凭据如何传递,security 说明此处接受哪些方案。方案可以被多个操作引用。FarmStall 在 apiKey 方案中写 in: header 与 name: Authorization,运行时仍须由服务实际校验。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    参考来源

    - 位置:《Designing APIs with Swagger and OpenAPI》第07章《Adding authentication and authorization》(来源项目 book-source:extracted/Designing APIs with Swagger and OpenAPI/_epub-src/OEBPS/Text/ch07.htm,阅读块 142) - 结论依据:原文强调方案名须与操作要求引用一致。 - 原始内容:This is how we declare security types within OpenAPI. We haven’t described which operations require it—we’ve only declared the security. We’ve chosen the simplest type of authorization, which is what FarmStall API uses, an HTTP header named Authorization. The name of the