将请求正文参数发送给arn授权者

时间:2019-08-08 00:39:11

标签: aws-lambda serverless aws-serverless lambda-authorizer

我试图将请求主体中的值发送给授权者,因为参数可以发送标头,但无法从请求主体中发送。

使用JSON路径和$ input.json尝试了不同的approaches

events:
  - http:
      method: POST
      path: /myAppPath
      cors: true
      authorizer:
          arn: "my:aws:lambda:arn"
          resultTtlInSeconds: 0
          identitySource: method.request.header.Authorization
          accountNumber: method.request.body.AccountNumber
          type: request
// Sample payload
{ AccountNumber: 11232131231 }

0 个答案:

没有答案