Closed
Description
Now that TimeProvider has been added to the platform in dotnet/runtime#83604, we should make the following changes in the aspnetcore layer for .NET 8:
- Remove all the copies of ISystemClock that exist in the repo (there are at least 6, with types that implement them), particularly all the ones that are not publicly exposed, and replace the places where they are used with TimeProvider.
- Two of these copies of ISystemClock are actually public and part of some of our API surface: Microsoft.AspNetCore.Authentication.ISystemClock, and Microsoft.AspNetCore.Server.kestrel.Core.Internal.Infrastructure.ISystemClock. We should consider deprecating those as well as the affected API that exposes them, and consider if there are new APIs/overloads that should be exposed that use TimeProvider as opposed to ISystemClock.
cc: @tarekgh @Tratcher @adityamandaleeka @davidfowl @mkArtakMSFT
- Authentication Obsolete and replace ISystemClock in Security, Identity #47472 #47717
- OutputCaching Replace ISystemClock with TimeProvider in OutputCaching, ResponseCaching #47753
- ResponseCaching Replace ISystemClock with TimeProvider in OutputCaching, ResponseCaching #47753
- YARP Using new TimeProvider yarp#2108
- SignalR Common - Replace ISystemClock in SignalR #47895
- Kestrel - Consider not using the wall clock time for timeouts in Kestrel #13628 suggests using a monotonic value like SignalR.
- Reconcile to a shared MockTimeProvider across AspNetCore. - Consider not using the wall clock time for timeouts in Kestrel #13628