APIGateway V2: add authorizerPayloadFormatVersion to the authorizer (#5144)
This commit is contained in:
parent
416bef76e6
commit
ea4af2346c
@ -261,7 +261,9 @@ class ApiGatewayV2Response(BaseResponse):
|
||||
params = json.loads(self.body)
|
||||
|
||||
auth_creds_arn = params.get("authorizerCredentialsArn")
|
||||
auth_payload_format_version = params.get("authorizerPayloadFormatVersion")
|
||||
auth_payload_format_version = (
|
||||
params.get("authorizerPayloadFormatVersion") or "2.0"
|
||||
)
|
||||
auth_result_ttl = params.get("authorizerResultTtlInSeconds")
|
||||
authorizer_type = params.get("authorizerType")
|
||||
authorizer_uri = params.get("authorizerUri")
|
||||
|
@ -51,6 +51,7 @@ def test_create_authorizer():
|
||||
{"Audience": ["a1"], "Issuer": "moto.com"}
|
||||
)
|
||||
resp.should.have.key("Name").equals("auth1")
|
||||
resp.should.have.key("AuthorizerPayloadFormatVersion").equals("2.0")
|
||||
|
||||
|
||||
@mock_apigatewayv2
|
||||
@ -67,6 +68,7 @@ def test_get_authorizer():
|
||||
resp.should.have.key("AuthorizerId")
|
||||
resp.should.have.key("AuthorizerType").equals("REQUEST")
|
||||
resp.should.have.key("Name").equals("auth1")
|
||||
resp.should.have.key("AuthorizerPayloadFormatVersion").equals("2.0")
|
||||
|
||||
|
||||
@mock_apigatewayv2
|
||||
|
Loading…
Reference in New Issue
Block a user