更新时间:2024-08-07 GMT+08:00

x-apigateway-auth-type

含义:基于Swagger的apiKey认证格式,定义API网关支持的特有认证方式。

作用域Security Scheme Object(2.0)/Security Scheme Object(3.0)

Swagger

securityDefinitions:
  apig-auth-app:
    in: header
    name: Authorization
    type: apiKey
    x-apigateway-auth-type: AppSigv1
  apig-auth-iam:
    in: header
    name: unused
    type: apiKey
    x-apigateway-auth-type: IAM

OpenAPI示例

securitySchemes:
    apig-auth-app:
      in: header
      name: Authorization
      type: apiKey
      x-apigateway-auth-type: AppSigv1
    apig-auth-iam:
      in: header
      name: unused
      type: apiKey
      x-apigateway-auth-type: IAM
表1 参数说明

参数

是否必选

类型

说明

x-apigateway-auth-type

String

API网关认证方式,支持AppSigv1、IAM

type

String

认证类型,仅支持apiKey

name

String

用于认证的参数名称

in

String

仅支持header

description

String

描述信息