I have a class that calls an external service which requires a token, and this is injected using the Settings class.
Now, depending on the request, I need to use one of two tokens.
I would like to use middleware to look at the incoming request to then configure what is injected into my service, but not sure this is possible?
Can I configure the DI from middleware?