-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add option for sending decrypted claims to JWT Javascript backend
- Loading branch information
Pavel Tolstov
committed
Jun 11, 2022
1 parent
d904546
commit 788ee91
Showing
5 changed files
with
83 additions
and
52 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
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,14 @@ | ||
function checkUser(token, username) { | ||
function checkUser(token, username, claims) { | ||
if(claims.username != username) { | ||
return false; | ||
} | ||
if(claims.iss != "jwt-test") { | ||
return false; | ||
} | ||
if(username == "test") { | ||
return true; | ||
} | ||
return false; | ||
} | ||
|
||
checkUser(token, username); | ||
checkUser(token, username, claims); |