Как разрешить зависимости в Startup.cs -IdentityServer4 SecurityTokenValidated событие в asp. net MVC 5.
[assembly: OwinStartup(typeof(Startup))]
public partial class Startup
{
public void Configuration(IAppBuilder app)
{
app.UseOpenIdConnectAuthentication(new OpenIdConnectAuthenticationOptions
{
..
Notifications = new OpenIdConnectAuthenticationNotifications
{
SecurityTokenValidated = async context =>
{
//get dependencies
var scope= context.OwinContext.GetAutofacLifetimeScope(); //getting null scope
var dataanager = scope.Resolve<IDataManager>();
..
}
}