-
-
Notifications
You must be signed in to change notification settings - Fork 795
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: skip adding authorizer to event if no authorizer is configured (#…
…1786) * dont add authorizor to event if no authorizer is configured * update test descriptions * Update src/events/http/HttpServer.js Co-authored-by: Dorian <[email protected]> --------- Co-authored-by: Dorian <[email protected]>
- Loading branch information
1 parent
ee20b48
commit 68f8f53
Showing
4 changed files
with
74 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,12 @@ | ||
const { stringify } = JSON | ||
|
||
export async function user() { | ||
export async function user(event) { | ||
const { authorizer } = event.requestContext | ||
return { | ||
body: stringify({ status: "Authorized" }), | ||
body: stringify({ | ||
hasAuthorizer: !!authorizer, | ||
status: "Authorized", | ||
}), | ||
statusCode: 200, | ||
} | ||
} |