简体   繁体   English

AWS API 网关 Lambda 授权方REQUEST类型没有methodArn?

[英]AWS API Gateway Lambda authorizer REQUEST type does not have methodArn?

Writing a custom API Gateway Lambda authorizer using C# and Im using the REQUEST authorizer (not TOKEN).使用 C# 编写自定义 API 网关 Lambda 授权方,并使用REQUEST授权方(非 TOKEN)编写 Im。 Looking at their documentation I should have an available parameter called methodArn but looking at the class APIGatewayProxyRequest it's not listed from their SDK.查看他们的文档,我应该有一个名为methodArn的可用参数,但查看 class APIGatewayProxyRequest它没有从他们的 SDK 中列出。

Is this the correct input parameter to use for my lambda authorizer?这是用于我的 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...>
    }
}

Try using APIGatewayCustomAuthorizerRequest instead of APIGatewayProxyRequest .尝试使用APIGatewayCustomAuthorizerRequest而不是APIGatewayProxyRequest

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM