Hi all, can I validate multiple session cookies at...
# ktor
h
Hi all, can I validate multiple session cookies at once using the authentication session plugin, or do I have to create my custom provider to do that? Thanks in advance
a
Can you please describe the problem in more detail?
h
Yep, so I have multiple cookies attach to my request to the server, but the server can only process one cookie per request (as their is one data provider and it only accept one session data format), is there any way to process multiple cookies in one request using the authentication plugin and session other than create a custom session handler?
a
Can you explain how multiple cookies should be processed?
h
I want to be able to extract all the data from multiple cookies one by one
a
So you want to validate them all to successfully authenticate the client?
h
yep, that's intention
a
Unfortunately, there is no way of doing it with the out-of-the-box
SessionAuthenticationProvider
because it's designed to validate only one session class. Also, the solution with the custom provider would require defining a session class for each cookie to be validated.
h
Understood, thanks @Aleksei Tirman [JB]