更新时间:2025-01-10 GMT+08:00

x-apigateway-auth-opt

含义:APP简易认证方式参数。

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

Swagger示例
securityDefinitions:
  apig-auth-app:
    type: apiKey
    name: Authorization
    in: header
    x-apigateway-auth-type: AppSigv1
  apig-auth-app-header:
    type: apiKey
    name: Authorization
    in: header
    x-apigateway-auth-opt:
      appcode-auth-type: header
    x-apigateway-auth-type: AppSigv1
  apig-auth-iam:
    type: apiKey
    name: unused
    in: header
    x-apigateway-auth-type: IAM

OpenAPI示例:

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

参数

是否必选

类型

说明

appcode-auth-type

String

AppCode简易认证类型,默认为disable。

  • disable:不开启简易认证
  • header:开启简易认证且AppCode位置在HEADER。