Friday, April 3, 2015

JWT token, signed in C#, and Decode in JS

JWT is a widly used token system that we can share token info between APIs or between Apps.

i.e we can sign the token by using a shared key in C#, then verify the token in javascript by using the same sharedkey.

in C#, you can search nuget for the jwt , there are several libraries.
image

let’s I want to sign a simple clamin using the simple password.
image

we get token eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJuYW1lIjoiUGV0ZXIiLCJSb2xlIjoiQWRtaW5zLFJlYWRlciJ9.Qh2J93epa7ls0y6DAn_8YvIRoRHq28hLT9N-93fStcajCd90nLzLG6Vit-Qdfl1TsPtL56qh4jiKDOzpfs1OyA

then follow the library for different languages from jwt.io to do the decoding

Past the token into the validation box, and enter pass in the shared key, you will see token get decoded and verified

image

3 comments:

adrian said...

For the more specific crowd, they give a library of incredible stallion recreations that can be requested online and conveyed comfortable doorstep.
scarymazegamex

adrian said...

The recreations seek assortment of player designs and appropriate for gaming on various consoles like Sony PlayStation, XBOX and Nintendo
letitgolyrics

adrian said...

The diversions are anything but difficult to introduce and can be delighted in whenever without the web restriction or the need to enroll as a part.
download showbox app

 
Locations of visitors to this page