2

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?

asked Nov 21, 2019 at 7:13
1
  • 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. Commented Nov 21, 2019 at 8:49

1 Answer 1

1

Remember to deploy API Gateway to apply settings before test.

answered Nov 21, 2019 at 8:55
Sign up to request clarification or add additional context in comments.

1 Comment

This was it. Just need to go to Resources->Actions->Deploy API menu item.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.