API Gateway custom Lambda function for JSON Web Token: https://jwt.io/introduction/
openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -nodes
Log into the AWS console and create an empty "jwtAuthorize" function using Node.js.
Create or copy your public key as "cert.pem" in this folder.
Run
npm install
grunt deploy --account-id=<your account id>
Go to the AWS console and choose your API gateway. Under "Resources" choose "Custom Authorizers".
Create a new authorizer with the identityToken source of method.request.header.Authorization
and a Token validation expression of Bearer [^\.]+\.[^\.]+\.[^\.]+
and associate it with your newly
created jwtAuthorizer Lambda function.