We currently use the JwtAuthProvider
as a custom IAuthProvider
in the AuthFeature
, that we of course register once in the AppHost.
The JwtAuthProvider
is currently fed a AuthKeyBase64
value from a setting in IAppSettings
on registration.
appHost.Plugins.Add(new AuthFeature(() => new AuthUserSession(), new IAuthProvider[]
{
new JwtAuthProvider(appSettings)
{
RequireSecureConnection = true,
AuthKeyBase64 = appSettings.GetString("JwtAuthNKeySetting"),
},
}));
We now want to make this service multi-tenanted, which means we are going to have a different value of AuthKeyBase64
for each tenant, and therefore different for every request.
Are there any suitable approaches in ServiceStack to re-read the AuthKeyBase64
value from configuration every request that comes in?