Add HttpContextAccessor to service registration

HttpContextAccessor is now included in the service container to enable dependency injection for accessing HTTP context. This improves support for features that require context details during runtime.
This commit is contained in:
Sipke Schoorstra 2025-03-03 19:13:51 +01:00
parent e0c1dafbbb
commit 44b61aa24e
No known key found for this signature in database
GPG key ID: 5C10502B28A4268F

View file

@ -199,6 +199,7 @@ public class IdentityFeature : FeatureBase
.AddScoped<ISecretGenerator, DefaultSecretGenerator>()
.AddScoped<IRandomStringGenerator, DefaultRandomStringGenerator>()
.AddScoped<DefaultApiKeyGeneratorAndParser>()
.AddHttpContextAccessor()
;
}
}