用于显示安全章节的组件。
安装
使用方法
import { SecuritySection } from "@/components/pivot/security-section";
<SecuritySection />
示例
基本用法
<SecuritySection />
API 参考
Props
属性 | 类型 | 默认值 | 描述 |
---|---|---|---|
className | string | - | 额外的 CSS 类名 |
Search for a command to run...
适用于服务器到服务器的通信,通过请求头传递 API 密钥
API calls must satisfy ONE of the following security requirement sets:
API 密钥认证,通过 X-API-Key 请求头传递。适用于服务器到服务器的通信。
Bearer Token 认证,使用 JWT 令牌。适用于用户会话认证。
OAuth 2.0 认证,支持授权码流程。适用于第三方应用集成。
https://api.example.com/oauth/authorize
Token URL: https://api.example.com/oauth/token
Refresh URL: https://api.example.com/oauth/refresh
Scopes:read:
读取用户数据和资源write:
创建和修改资源admin:
管理员权限,包含所有操作profile:
访问用户基本信息email:
访问用户邮箱地址https://api.example.com/oauth/token
Scopes:api:read:
API 读取权限api:write:
API 写入权限HTTP 基本认证,使用用户名和密码。仅用于开发和测试环境。
基于 Cookie 的会话认证,适用于 Web 应用。
OpenID Connect 认证,基于 OAuth 2.0 的身份认证层。
使用 JWT 令牌进行用户会话认证
API calls must satisfy ONE of the following security requirement sets:
API 密钥认证,通过 X-API-Key 请求头传递。适用于服务器到服务器的通信。
Bearer Token 认证,使用 JWT 令牌。适用于用户会话认证。
OAuth 2.0 认证,支持授权码流程。适用于第三方应用集成。
https://api.example.com/oauth/authorize
Token URL: https://api.example.com/oauth/token
Refresh URL: https://api.example.com/oauth/refresh
Scopes:read:
读取用户数据和资源write:
创建和修改资源admin:
管理员权限,包含所有操作profile:
访问用户基本信息email:
访问用户邮箱地址https://api.example.com/oauth/token
Scopes:api:read:
API 读取权限api:write:
API 写入权限HTTP 基本认证,使用用户名和密码。仅用于开发和测试环境。
基于 Cookie 的会话认证,适用于 Web 应用。
OpenID Connect 认证,基于 OAuth 2.0 的身份认证层。
支持多种授权流程和权限范围的 OAuth 2.0 认证
API calls must satisfy ONE of the following security requirement sets:
API 密钥认证,通过 X-API-Key 请求头传递。适用于服务器到服务器的通信。
Bearer Token 认证,使用 JWT 令牌。适用于用户会话认证。
OAuth 2.0 认证,支持授权码流程。适用于第三方应用集成。
https://api.example.com/oauth/authorize
Token URL: https://api.example.com/oauth/token
Refresh URL: https://api.example.com/oauth/refresh
Scopes:read:
读取用户数据和资源write:
创建和修改资源admin:
管理员权限,包含所有操作profile:
访问用户基本信息email:
访问用户邮箱地址https://api.example.com/oauth/token
Scopes:api:read:
API 读取权限api:write:
API 写入权限HTTP 基本认证,使用用户名和密码。仅用于开发和测试环境。
基于 Cookie 的会话认证,适用于 Web 应用。
OpenID Connect 认证,基于 OAuth 2.0 的身份认证层。
同时需要 API 密钥和 Bearer Token 的双重认证
API calls must satisfy ONE of the following security requirement sets:
API 密钥认证,通过 X-API-Key 请求头传递。适用于服务器到服务器的通信。
Bearer Token 认证,使用 JWT 令牌。适用于用户会话认证。
OAuth 2.0 认证,支持授权码流程。适用于第三方应用集成。
https://api.example.com/oauth/authorize
Token URL: https://api.example.com/oauth/token
Refresh URL: https://api.example.com/oauth/refresh
Scopes:read:
读取用户数据和资源write:
创建和修改资源admin:
管理员权限,包含所有操作profile:
访问用户基本信息email:
访问用户邮箱地址https://api.example.com/oauth/token
Scopes:api:read:
API 读取权限api:write:
API 写入权限HTTP 基本认证,使用用户名和密码。仅用于开发和测试环境。
基于 Cookie 的会话认证,适用于 Web 应用。
OpenID Connect 认证,基于 OAuth 2.0 的身份认证层。
支持多种认证方式,客户端可以选择其中一种
API calls must satisfy ONE of the following security requirement sets:
API 密钥认证,通过 X-API-Key 请求头传递。适用于服务器到服务器的通信。
Bearer Token 认证,使用 JWT 令牌。适用于用户会话认证。
OAuth 2.0 认证,支持授权码流程。适用于第三方应用集成。
https://api.example.com/oauth/authorize
Token URL: https://api.example.com/oauth/token
Refresh URL: https://api.example.com/oauth/refresh
Scopes:read:
读取用户数据和资源write:
创建和修改资源admin:
管理员权限,包含所有操作profile:
访问用户基本信息email:
访问用户邮箱地址https://api.example.com/oauth/token
Scopes:api:read:
API 读取权限api:write:
API 写入权限HTTP 基本认证,使用用户名和密码。仅用于开发和测试环境。
基于 Cookie 的会话认证,适用于 Web 应用。
OpenID Connect 认证,基于 OAuth 2.0 的身份认证层。
传统的用户名密码认证方式,适用于开发环境
API calls must satisfy ONE of the following security requirement sets:
API 密钥认证,通过 X-API-Key 请求头传递。适用于服务器到服务器的通信。
Bearer Token 认证,使用 JWT 令牌。适用于用户会话认证。
OAuth 2.0 认证,支持授权码流程。适用于第三方应用集成。
https://api.example.com/oauth/authorize
Token URL: https://api.example.com/oauth/token
Refresh URL: https://api.example.com/oauth/refresh
Scopes:read:
读取用户数据和资源write:
创建和修改资源admin:
管理员权限,包含所有操作profile:
访问用户基本信息email:
访问用户邮箱地址https://api.example.com/oauth/token
Scopes:api:read:
API 读取权限api:write:
API 写入权限HTTP 基本认证,使用用户名和密码。仅用于开发和测试环境。
基于 Cookie 的会话认证,适用于 Web 应用。
OpenID Connect 认证,基于 OAuth 2.0 的身份认证层。
基于 Cookie 的会话认证,适用于 Web 应用
API calls must satisfy ONE of the following security requirement sets:
API 密钥认证,通过 X-API-Key 请求头传递。适用于服务器到服务器的通信。
Bearer Token 认证,使用 JWT 令牌。适用于用户会话认证。
OAuth 2.0 认证,支持授权码流程。适用于第三方应用集成。
https://api.example.com/oauth/authorize
Token URL: https://api.example.com/oauth/token
Refresh URL: https://api.example.com/oauth/refresh
Scopes:read:
读取用户数据和资源write:
创建和修改资源admin:
管理员权限,包含所有操作profile:
访问用户基本信息email:
访问用户邮箱地址https://api.example.com/oauth/token
Scopes:api:read:
API 读取权限api:write:
API 写入权限HTTP 基本认证,使用用户名和密码。仅用于开发和测试环境。
基于 Cookie 的会话认证,适用于 Web 应用。
OpenID Connect 认证,基于 OAuth 2.0 的身份认证层。
基于 OAuth 2.0 的身份认证层,提供用户身份信息
API calls must satisfy ONE of the following security requirement sets:
API 密钥认证,通过 X-API-Key 请求头传递。适用于服务器到服务器的通信。
Bearer Token 认证,使用 JWT 令牌。适用于用户会话认证。
OAuth 2.0 认证,支持授权码流程。适用于第三方应用集成。
https://api.example.com/oauth/authorize
Token URL: https://api.example.com/oauth/token
Refresh URL: https://api.example.com/oauth/refresh
Scopes:read:
读取用户数据和资源write:
创建和修改资源admin:
管理员权限,包含所有操作profile:
访问用户基本信息email:
访问用户邮箱地址https://api.example.com/oauth/token
Scopes:api:read:
API 读取权限api:write:
API 写入权限HTTP 基本认证,使用用户名和密码。仅用于开发和测试环境。
基于 Cookie 的会话认证,适用于 Web 应用。
OpenID Connect 认证,基于 OAuth 2.0 的身份认证层。