LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-20-2022, 05:27 PM   #1
seamore
Member
 
Registered: Sep 2009
Posts: 83

Rep: Reputation: 1
Verifying a JWT signature


I would like to create my own JWT signature to compare with the original. I see the following code on several sites:

HMACSHA256(
base64UrlEncode(header) + "." +
base64UrlEncode(payload),
*secret base64 encoded*
)

There is no detail on what imports I need or code prior to this.
I have the three elements, just need help getting to the point to use the above.
 
Old 04-20-2022, 07:09 PM   #2
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,249

Rep: Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323
Have you, like, somehow not considered linking to the sites? Really? How can that be?
 
Old 04-21-2022, 12:20 AM   #3
seamore
Member
 
Registered: Sep 2009
Posts: 83

Original Poster
Rep: Reputation: 1
Here is an example

https://hirosht.medium.com/customize...6-267574bd7639
 
Old 04-21-2022, 09:36 AM   #4
seamore
Member
 
Registered: Sep 2009
Posts: 83

Original Poster
Rep: Reputation: 1
Please disregard this post.
I now find that the code I posted is "pseudo code"
 
Old 04-21-2022, 12:05 PM   #5
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,269
Blog Entries: 24

Rep: Reputation: 4206Reputation: 4206Reputation: 4206Reputation: 4206Reputation: 4206Reputation: 4206Reputation: 4206Reputation: 4206Reputation: 4206Reputation: 4206Reputation: 4206
Quote:
Originally Posted by seamore View Post
Please disregard this post.
I now find that the code I posted is "pseudo code"
Please review the Site FAQ for guidance in asking well formed questions. Especially visit the link from that page, How to Ask Questions the Smart Way for discussion of things to consider when asking others for help.
 
Old 04-22-2022, 03:03 PM   #6
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,249

Rep: Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323
Quote:
Originally Posted by seamore View Post
I would like to create my own JWT signature to compare with the original.
Let me ask an excellent question:

Why?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
haproxy with jwt EHSANLINUX Linux - Server 3 10-16-2019 10:13 AM
How to create JWT using Python urllib2 module linux_project Linux - Newbie 0 06-22-2019 07:45 PM
verifying signature for debian vblah Linux - Newbie 2 03-10-2016 10:13 AM
verifying signature of any rpm sachin_malik Linux - General 4 02-21-2006 09:57 PM
Modem not verifying password Proud Linux - Hardware 17 01-31-2003 01:53 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration