Skip to content

Commit 41dcdab

Browse files
rohandalvikeetonian
authored andcommitted
chore: fix api-gateway-authorizer app insecure auth token logging (#604)
1 parent 618e584 commit 41dcdab

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

examples/apps/api-gateway-authorizer-nodejs/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,8 @@ AuthPolicy.prototype = (function AuthPolicyClass() {
312312

313313

314314
exports.handler = (event, context, callback) => {
315-
console.log('Client token:', event.authorizationToken);
315+
// incoming token value
316+
var token = event.authorizationToken;
316317
console.log('Method ARN:', event.methodArn);
317318

318319
// validate the incoming token

examples/apps/api-gateway-authorizer-python/lambda_function.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44

55

66
def lambda_handler(event, context):
7-
print("Client token: " + event['authorizationToken'])
7+
# incoming token value
8+
token = event['authorizationToken']
89
print("Method ARN: " + event['methodArn'])
910

1011
'''

0 commit comments

Comments
 (0)