Skip to content

Commit 4e4b067

Browse files
committed
add custom authorizer info
1 parent cf653f8 commit 4e4b067

File tree

1 file changed

+13
-0
lines changed
  • aws-node-auth0-custom-authorizers-api

1 file changed

+13
-0
lines changed

aws-node-auth0-custom-authorizers-api/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,19 @@ Custom Authorizers allow you to run an AWS Lambda Function before your targeted
4141

4242
6. Deploy Frontend to host of your choosing and make sure to configure the `Allowed Callback URL` and `Allowed Origins` in your auth0 client in the [auth0 dashboard](https://manage.auth0.com). We used `http://auth0-serverless-protected-routes-demo.surge.sh/` for our demo.
4343

44+
## Custom authorizer functions
45+
46+
[Custom authorizers functions](https://aws.amazon.com/blogs/compute/introducing-custom-authorizers-in-amazon-api-gateway/) are executed before a Lambda function is executed and return an Error or a Policy document.
47+
48+
The Custom authorizer function is passed an `event` object as below:
49+
```javascript
50+
{
51+
"type": "TOKEN",
52+
"authorizationToken": "<Incoming bearer token>",
53+
"methodArn": "arn:aws:execute-api:<Region id>:<Account id>:<API id>/<Stage>/<Method>/<Resource path>"
54+
}
55+
```
56+
4457
## Frontend
4558

4659
The frontend is a bare bones vanilla javascript implementation.

0 commit comments

Comments
 (0)