[Help] after decode JTW token with base64Decode function unable to parse that decode detail ?



  • alt text

    after decode its show detail when i see exp : 1607610071 so it a time i want to use time function but problem is that it decode from base64 than how can i use function again to decrpty exp to timestamp ... ??? hope you understand..



  • First of all JWT token does have a signature that is done by a secret on server side, that means you can't change the token content and still be accepted by the server, your question is kinda not understandable, if you're trying a custom timestamp just use the CurrentUnixTime on the function block, if you're trying to convert from the unix timestamp into readable date use the UnixTimeToDate on the function block as well, if thats not what you looking for. please make an example of the input and output you looking for, or enlightening us more.



  • First of All, Hide the bloody Email even if it's yours.
    Second, use this to parse the exp data

    PARSE "<SOURCE>" LR "exp\":" "," -> VAR "EXP" 
    

    Third, use the function

    FUNCTION UnixTimeToDate "yyyy-MM-dd:HH-mm-ss" "<EXP>" -> VAR "Expiration" 
    

    to convert the UnixTime to Date
    If that's what you want.



  • @Fairy

    i have done the same but it wont work , reason it that the responnse is of base64decode , it decrpty the token than showing content , so i am trying to cpature that decrpyt detail but no luck...maybe its a problem of funtion.. get response from site its work but response of base64decode not work..when try to captuere



  • It should be working
    Try capturing from the base64 variable
    (i.e. parse token from source and name it var1 ---> base64 decode "var1" and name it var2 ---> parse "exp" from "var2" and name it "var3" ---> use UnixtineToDate function on the variable "var3" and name it "date" or something)
    If the issue persists, then send me the source and I'll send you the result.


Log in to reply