Now I have a ktor client specific question. If I d...
# ktor
f
Now I have a ktor client specific question. If I develop a custom feature (that does for example some custom authentication logic/signing of payloads) but needs to use user specific details (my app is multi user capable). How would I go about that? Would I need to create a new client instance for each user and then pass the specific client credentials as part of the Feature setup? Or is there are a better way. For Feign client I for example used ThreadLocal to pass in this information. So before calling the HttpClient I was setting the ThreadLocal with the required info. is there something similar for ktor client and ktor client Features?
j
so you want to know how to build the server or how to do both, client and server?
f
my server need to use a SSO to validate and obtains my users' info and i created a new client
f
I want to know how can I add dynamic arguments (that I populate for example as part of a route) so that a feature within a ktor client can read it
E.g. passing along who is currently authenticated from the server REST endpoint to a ktor-client external API call