
# x-apigateway-authorizer
**含义**：自定义认证对象。
**作用域** ： [Security Scheme Object](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#security-scheme-object)
**示例**：
```
x-apigateway-authorizer:
      auth_downgrade_enabled: false
      authorizer_alias_uri: ''
      authorizer_type: FUNC
      authorizer_uri: >-
        urn:fss:region:73d69ae0cfcf460190522d**********:function:default:DSFA
      authorizer_version: latest
      identities:
        - location: HEADER
          name: test
          validation: ''
      need_body: false
      network_type: V2
      retry_attempts: 0
      timeout: 5000
      ttl: 0
      type: FRONTEND
```
表1参数说明 
| 参数                     | 是否必选 | 类型                        | 说明                                                                                                                                                                                                                                           |
|:---|:---|:---|:---|
| authorizer_type        | 是    | String                    | 自定义认证类型：FUNC。                                                                                                                                                                                                                                |
| authorizer_uri         | 是    | String                    | 函数地址。                                                                                                                                                                                                                                        |
| auth_downgrade_enabled | 否    | Boolean                   | 宽松模式开关，默认为false。                                                                                                                                                                                                                             |
| authorizer_alias_uri   | 否    | String                    | 函数别名地址。 当函数别名URN和函数版本同时传入时，函数版本将被忽略，只会使用函数别名URN。                                                                                                                                                              |
| authorizer_version     | 否    | String                    | 函数版本。 当函数别名URN和函数版本同时传入时，函数版本将被忽略，只会使用函数别名URN。 最大长度：64。                                                                                                                       |
| need_body              | 否    | Boolean                   | 是否发送body。                                                                                                                                                                                                                                    |
| identities             | 否    | Array of Identity objects | 认证来源。                                                                                                                                                                                                                                        |
| network_type           | 否    | String                    | 对接函数的网络架构类型。 - V1：非VPC网络架构。  - V2：VPC网络架构。   缺省值：V1。 |
| retry_attempts         | 否    | Number                    | 重试次数。                                                                                                                                                                                                                                        |
| timeout                | 否    | Number                    | 超时时间。                                                                                                                                                                                                                                        |
| ttl                    | 否    | Number                    | 缓存时间。                                                                                                                                                                                                                                        |
| type                   | 是    | String                    | 自定义认证类型。 - FRONTEND：前端。  - BACKEND：后端。           |
   
表2Identity 
| 参数         | 是否必选 | 类型     | 说明                    |
|:---|:---|:---|:---|
| name       | 是    | String | 参数名称。                 |
| location   | 是    | String | 参数位置。                 |
| validation | 否    | String | 参数校验表达式，默认为null，不做校验。 |
   
