documentation request: working example for custom authorizer
See original GitHub issueDo you want to request a feature or report a bug?
Feature
What is the current behavior?
The README mentions an authorizer
but does not provide much detail about options
or the expected function signature of callback
. Even if these had types, developers without TypeScript would still be left wondering.
What is the expected behavior?
Some description of what to do with options
and why the callback receives false
(when would it be true?) would be nice. Maybe a short example that uses fetch would be illustrative?
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Use API Gateway Lambda authorizers - AWS Documentation
A Lambda authorizer (formerly known as a custom authorizer) is an API Gateway feature that uses a Lambda function to control access to...
Read more >The Complete Guide to Custom Authorizers with AWS ...
In this post, you'll learn about using API Gateway custom authorizers. This post covers: Background on custom authorizers and their benefits ...
Read more >Working with Amazon Lambda authorizers for HTTP APIs
Working with Amazon Lambda authorizers for HTTP APIs. PDFRSS. You use a Lambda authorizer to use a Lambda function to control access to...
Read more >API Gateway LAMBDA AUTHORIZER (Custom Authorizer)
Hey When building serverless APIs with AWS Lambda and API Gateway, one of the most critical questions is how to secure the API....
Read more >Secure your API Gateway with Lambda Authorizer - YouTube
Using AWS API Gateway and Lambda based authorizers, we can secure our API Gateway REST endpoint. Learn how to do it in this...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@skellock That matches where I ended up as well. Here’s another version:
This is my best understanding of the authorizer API expressed as a TypeScript interface:
https://github.com/DefinitelyTyped/DefinitelyTyped/blob/9f4c75126167d0d8af759f58405d53d983e94ad0/types/pusher-js/index.d.ts#L126-L128
Apologies in advance for being
+1
guy, but this really needs some love.For future travelers of the internet, here’s what I ended up doing that worked for me.
FWIW, this was using
pusher-js@4.2.2
andreact-native@0.53.0
.Docs matter. And given my track record writing 'em, I’m probably the worst person to be dishing up that advice.