You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 22, 2021. It is now read-only.
So I'm trying to just grab the payload by doing this from the rails console: original_jwt = Knock::AuthToken.new token: "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1MDY1MzcwNjMsImF1ZCI6ZmFsc2UsInVzZXJfaWQiOjMyfQ.-DOTPr-AVmNVS_dH3NMUXhJgnYg3RdeyvZ7_1VTU4RY" => #<Knock::AuthToken:0x007f920c3ad888 @payload={"exp"=>1506537063, "aud"=>false, "user_id"=>32}, @token="eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1MDY1MzcwNjMsImF1ZCI6ZmFsc2UsInVzZXJfaWQiOjMyfQ.-DOTPr-AVmNVS_dH3NMUXhJgnYg3RdeyvZ7_1VTU4RY">
Which means, I should be able to get the payload via: original_jwt.payload
But it just returns as NoMethodError: undefined method payload' for #Knock::AuthToken:0x007f920c3ad888`
However, original_jwt.token works.
Does anyone know how to extract the payload?
The text was updated successfully, but these errors were encountered:
So I'm trying to just grab the payload by doing this from the rails console:
original_jwt = Knock::AuthToken.new token: "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1MDY1MzcwNjMsImF1ZCI6ZmFsc2UsInVzZXJfaWQiOjMyfQ.-DOTPr-AVmNVS_dH3NMUXhJgnYg3RdeyvZ7_1VTU4RY" => #<Knock::AuthToken:0x007f920c3ad888 @payload={"exp"=>1506537063, "aud"=>false, "user_id"=>32}, @token="eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1MDY1MzcwNjMsImF1ZCI6ZmFsc2UsInVzZXJfaWQiOjMyfQ.-DOTPr-AVmNVS_dH3NMUXhJgnYg3RdeyvZ7_1VTU4RY">
Which means, I should be able to get the payload via:
original_jwt.payload
But it just returns as
NoMethodError: undefined method
payload' for #Knock::AuthToken:0x007f920c3ad888`However, original_jwt.token works.
Does anyone know how to extract the payload?
The text was updated successfully, but these errors were encountered: