Hello! Nice to meet everyone!
Random question regarding the
Sessions plugin.
Is it possible to use this plugin to just simply store a JWT string in the cookie. I want to opt to not use Authorization headers for my use case.
So something like
cookie<String>("SESSION") { ... }
The documentation just alludes to always signing/transforming the cookie (as well as making a data class instead of using String), but my JWT is already encrypted.
Then I'm calling
val accessToken = ...
call.sessions.set(accessToken)
But the header response looks like
Set-Cookie: SESSION=length%3D%2523i536; ...
instead of what I wanted to expect as
Set-Cookie: SESSION=eyJhbG.....
Thanks! And if there's no easy solution, no big deal. I can just manually set the cookie header myself, just was curious if I could use the plugin just because its cleaner.
Oops: Just realized this isn't a KTOR specific channel. Please let me know if I should ask somewhere else, or go to KTOR github next! Thanks.