> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://buildwithfern.com/learn/llms.txt.

## API Explorer 中的多重身份验证方案

API Explorer 现在支持 OpenAPI 规范的多重身份验证方案和身份验证方案组合。

首先，在您的 OpenAPI 规范中配置多个安全选项：

**`openapi.yml`**

```yaml openapi.yml {8-11}
/plant/search/status:
  get:
    tags:
      - plant
    summary: Search plants by status
    description: Filter plants based on their current status.
    operationId: searchPlantsByStatus
    security:
      - bearerAuth: []  # Option 1: Bearer token only (OR)
      - basicAuth: []   # Option 2: Basic auth AND API key (combined)
        apiKey: []
```

然后，API Explorer 会自动在下拉菜单中显示所有可用的身份验证选项，允许用户在发送请求前选择和配置他们首选的身份验证方法。

![API Explorer 中的身份验证下拉菜单](/learn/_fern-img/a4c05f14561debdc68b1163692a2fcb73c006263f24061e313c30075c68fb296.webp)

阅读文档