Skip to content

Commit

Permalink
Update verify token
Browse files Browse the repository at this point in the history
  • Loading branch information
marklise committed Oct 3, 2024
1 parent aaf7772 commit cd79584
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions handlers/authorizer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ function validateToken(token) {
const decodedToken = jwt.decode(token, { complete: true });
console.log(decodedToken);
const headers = decodedToken.header;
console.log('headers', headers);
console.log('headers:', headers);
const kid = headers.kid;
console.log('kid', kid);
console.log('kid:', kid);

// search for the kid in the downloaded public keys
let keyIndex = -1;
Expand All @@ -110,7 +110,7 @@ function validateToken(token) {
break;
}
}
console.log(keyIndex);
console.log('keyindex:', keyIndex);

if (keyIndex === -1) {
console.log('Public key not found in jwks.json');
Expand Down

0 comments on commit cd79584

Please sign in to comment.