<Ktor server: correct way to implement a custom re...
# forum
r
Ktor server: correct way to implement a custom response authentication wrapper Hey there, I’m wondering what the correct way of setting a thread-bound authentication is. I built a custom plugin that should start the authentication on AuthenticatioChecked and end it after every response is sent (or if there was an error). Basically, it works, but it looks like the authentication is not cleared correctly every time, that’s why I’m wondering if I’m doing something wrong. Please have a look at the code: private val authenticatedUserKey = AttributeKey("authenticatedUser")...