1
votes

I am new with AWS and currently, I have a project running on Laravel 5.2 and the API which I have do not have any kind of authentication like the JWT for example. I was looking for API authentication and thought of using Amazon API Gateway. I wanted to know will Amazon API Gateway will help me with API authentication like a token-based authentication for each API. And should I go for the service or should I stick to the JWT solution?

Please share some knowledge. Thank you.

1

1 Answers

0
votes

You can implement JWT token validation at AWS API Gateway level keeping uour API logic clean.

To do this, you can use a special AWS Lambda function called custom authorizer where you can read the token from HTTP headers and validate it. This way your internal API is accessible only for the requests coming with a valid JWT Token.