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
The application sets up as described:
- WWW-Authenticate in the 401 response
- Request Authorizer set up in the Authorizer section
- Tie the authorizer to my endpoint, on the ANY method execution
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. The authorizer lambda doesn't get called and there are no logs in CloudWatch.
Any idea where I could look next?
-
Are you caching the token? Create a new token, then do your curl before any other test and see if the authorizer lambda fires then.K Mo– K Mo2019年11月21日 08:49:32 +00:00Commented Nov 21, 2019 at 8:49
1 Answer 1
Remember to deploy API Gateway to apply settings before test.
1 Comment
Resources->Actions->Deploy API menu item.Explore related questions
See similar questions with these tags.