nav-img
Advanced

x-apigateway-authorizer

Meaning: Custom authorizer.

Scope of effect: Security Scheme Object

Example:

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
Table 1 Parameter description

Parameter

Mandatory

Type

Description

authorizer_type

Yes

String

Value: FUNC

authorizer_uri

Yes

String

Function URN.

auth_downgrade_enabled

No

Boolean

Whether to enable the relaxed mode. The default value is false.

authorizer_alias_uri

No

String

Function alias address.

If both the alias and version are specified, the version will be ignored and only the alias will be used.

authorizer_version

No

String

Function version.

If both the alias and version are specified, the version will be ignored and only the alias will be used.

Maximum length: 64 characters.

need_body

No

Boolean

Indicates whether to send the body.

identities

No

Array of Identity objects

Identity source.

network_type

No

String

Function network architecture:

  • V1: non-VPC
  • V2: VPC

Default value: V1.

retry_attempts

No

Number

Number of retries.

timeout

No

Number

Timeout.

ttl

No

Number

Cache TTL.

type

Yes

String

Custom authorizer type.

  • FRONTEND
  • BACKEND
Table 2 Identity

Parameter

Mandatory

Type

Description

name

Yes

String

Parameter name.

location

Yes

String

Parameter location.

validation

No

String

Parameter verification expression. The default value is null, indicating that no verification is performed.