Repository navigation
Add GET /whoami route and pass token in authorizer context - #17
Open
localstack-platform[bot] wants to merge 2 commits into
Open
localstack-platform[bot] wants to merge 2 commits into
localstack-platform[bot] wants to merge 2 commits into
Conversation
Added a GET /whoami route to the SAM template and a whoami handler in src/handler.js returning principalId. Updated the authorizer in src/authorizer.js to include token details in context, and added assertions in test.sh for /whoami. Co-authored-by: harsh <harsh@localstack.cloud>
Removed the duplicate token property from authResponse.context in src/authorizer.js, retaining only the tokenName key in the authorizer context. Co-authored-by: harsh <harsh@localstack.cloud>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a GET /whoami route to the API Gateway SAM template and handler returning the caller's principalId. Update the Lambda authorizer to include the token name in its returned context object, and add assertions in test.sh for /whoami.
What changed
Tests
Not verified here
Drift noticed
None noticed.
Needs a human
None.
Turn 2: Remove duplicate token key from authorizer context
Plan approved by harsh · google/gemini-3.5-flash · commit
9948e7cWhat changed
Tests
None requested.
Not verified here
Drift noticed
None noticed.
Needs a human
None.
Built by LocalStack Build from a plan approved by harsh · session · turn 1 · google/gemini-3.5-flash