Skip to content

Commit

Permalink
Register TimeProvider in DI
Browse files Browse the repository at this point in the history
  • Loading branch information
kirill-abblix committed Apr 13, 2024
1 parent 3ccc18d commit f6cf613
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Abblix.Oidc.Server/Features/ServiceCollectionExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ public static IServiceCollection AddClientInformation(this IServiceCollection se
public static IServiceCollection AddCommonServices(this IServiceCollection services)
{
return services
#if NET8_0_OR_GREATER
.AddSingleton(TimeProvider.System)
#endif
.AddSingleton<IClock, SystemClock>()
.AddSingleton<IHashService, HashService>()
.AddSingleton<ISubjectTypeConverter, SubjectTypeConverter>()
Expand Down

0 comments on commit f6cf613

Please sign in to comment.