简体   繁体   English

AWS API 网关自定义授权器 lambda 未触发

[英]AWS API Gateway Custom Authorizer lambda is not triggering

I'm trying to implement Basic authentication, using this article as inspiration:我正在尝试实现基本身份验证,以这篇文章为灵感:

https://medium.com/@Da_vidgf/http-basic-auth-with-api-gateway-and-serverless-5ae14ad0a270 https://medium.com/@Da_vidgf/http-basic-auth-with-api-gateway-and-serverless-5ae14ad0a270

The application sets up as described:应用程序设置如下:

  • WWW-Authenticate in the 401 response WWW-在 401 响应中进行身份验证
  • Request Authorizer set up in the Authorizer section请求授权人设置在授权人部分
  • Tie the authorizer to my endpoint, on the ANY method execution在 ANY 方法执行时将授权方绑定到我的端点

I can test my custom authorizer using the Test feature under Authorizers successfully but when I call the API using curl (or anything else) there is no authentication.我可以使用Authorizers人下的Test功能成功测试我的自定义授权人,但是当我使用 curl(或其他任何东西)调用 API 时,没有身份验证。 The authorizer lambda doesn't get called and there are no logs in CloudWatch.未调用授权方 lambda 并且 CloudWatch 中没有日志。

Any idea where I could look next?知道我接下来可以看哪里吗?

Remember to deploy API Gateway to apply settings before test.请记住部署 API 网关以在测试前应用设置。

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

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