JWT JSON Web Tokens and Omnis Studio
Bastiaan Olij
bastiaan at muxworks.com.au
Mon Jun 7 22:20:51 UTC 2021
Hey Reg,
Been awhile since I did my implementation but it was pretty straight
forward.
JSON Web Tokens are basically 2 JSON segments, one identifying the hash
algorithm and one with your actual data (and a few mandatory fields).
You base64 both documents and concatenate them. Then create a hash and
base64 the outcome.
Concatenate all 3 base64 strings and you have your token.
The encryption information and your data aren't actually encrypted and
anyone who has the token can just decode them using base64 so don't put
anything secret in there. It's the 3rd part which encodes the hash which
allows you to verify the data came from a known source as only the
source and destination have the secret key.
Now I did the hashing in PostgreSQL with its crypto library, not in
Omnis, I'm not 100% sure if Omnis can do the required hash.
See more: https://jwt.io/
Cheers,
Bas
On 6/7/2021 11:01 PM, Reg Paling wrote:
> Hi all,
>
> I need to work with JSON Web Tokens, specifically to generate them and
> sign them.
>
> Any recommendations for the sweetest approach in Studio 10.2?
>
> Thanks
> Reg
>
>
>
>
> _____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com
> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com
--
Kindest Regards,
Bastiaan Olij
bastiaan at muxworks.com.au
+61-432144833
More information about the omnisdev-en
mailing list