bungle / lua-resty-session

Session library for OpenResty – flexible and secure
BSD 2-Clause "Simplified" License
320 stars 111 forks source link

Advice: is there a way to display content of a encrypted session cookies for debugging? #53

Closed thomasleplus closed 6 years ago

thomasleplus commented 6 years ago

Hi,

I am trying to figure out an issue with my web application. I think the issue is that the wrong data is stored in the session so I was wondering if there is an easy way that I could inspect the content of my (encrypted) session cookie. I mean something like a command line that would receive as arguments the cookie(s) content and the session secret and display the content of the session?

Cheers,

Tom

bungle commented 6 years ago

@thomasleplus how about using: https://github.com/bungle/lua-resty-session#none-cipher

bungle commented 6 years ago

Then it is just base64decode(<data-part-of-the-session-cookie>) and you will get JSON string.

thomasleplus commented 6 years ago

Good idea! Thanks.