0

使用 C# 编写自定义 API Gateway Lambda 授权方,Im 使用REQUEST授权方(不是 TOKEN)。查看他们的文档,我应该有一个可用的参数,methodArn但查看APIGatewayProxyRequest它未从他们的 SDK 中列出的类。

这是用于我的 lambda 授权方的正确输入参数吗?

namespace Amazon.Lambda.APIGatewayEvents
{
    public class APIGatewayProxyRequest
    {
        public APIGatewayProxyRequest();

        public string Resource { get; set; }
        public string Path { get; set; }
        public string HttpMethod { get; set; }
        public IDictionary<string, string> Headers { get; set; }
        public IDictionary<string, IList<string>> MultiValueHeaders { get; set; }
        public IDictionary<string, string> QueryStringParameters { get; set; }
        public IDictionary<string, IList<string>> MultiValueQueryStringParameters { get; set; }
        public IDictionary<string, string> PathParameters { get; set; }
        public IDictionary<string, string> StageVariables { get; set; }
        public ProxyRequestContext RequestContext { get; set; }
        public string Body { get; set; }
        public bool IsBase64Encoded { get; set; }

        <...SNIP...>
    }
}
4

1 回答 1

1

尝试使用APIGatewayCustomAuthorizerRequest而不是APIGatewayProxyRequest.

于 2020-07-08T03:34:31.800 回答