1 implementation of ITimeLimitedDataProtector
Microsoft.AspNetCore.DataProtection.Extensions (1)
TimeLimitedDataProtector.cs (1)
17internal sealed class TimeLimitedDataProtector : ITimeLimitedDataProtector
34 references to ITimeLimitedDataProtector
Microsoft.AspNetCore.Components.Endpoints (4)
Builder\OpaqueRedirection.cs (3)
44var protector = CreateProtector(httpContext); 74var protector = CreateProtector(httpContext); 96private static ITimeLimitedDataProtector CreateProtector(HttpContext httpContext)
DependencyInjection\ServerComponentSerializer.cs (1)
12private readonly ITimeLimitedDataProtector _dataProtector;
Microsoft.AspNetCore.Components.Endpoints.Tests (8)
EndpointHtmlRendererTest.cs (8)
300var protector = _dataprotectorProvider.CreateProtector(ServerComponentSerializationSettings.DataProtectionProviderPurpose) 332var protector = _dataprotectorProvider.CreateProtector(ServerComponentSerializationSettings.DataProtectionProviderPurpose) 393var protector = _dataprotectorProvider.CreateProtector(ServerComponentSerializationSettings.DataProtectionProviderPurpose) 450var protector = _dataprotectorProvider.CreateProtector(ServerComponentSerializationSettings.DataProtectionProviderPurpose) 489var protector = _dataprotectorProvider.CreateProtector(ServerComponentSerializationSettings.DataProtectionProviderPurpose) 528var protector = _dataprotectorProvider.CreateProtector(ServerComponentSerializationSettings.DataProtectionProviderPurpose) 579var protector = _dataprotectorProvider.CreateProtector(ServerComponentSerializationSettings.DataProtectionProviderPurpose) 1054var protector = _dataprotectorProvider.CreateProtector(ServerComponentSerializationSettings.DataProtectionProviderPurpose)
Microsoft.AspNetCore.Components.Server.Tests (2)
Circuits\ServerComponentDeserializerTest.cs (1)
14private readonly ITimeLimitedDataProtector _protector;
src\Components\Endpoints\src\DependencyInjection\ServerComponentSerializer.cs (1)
12private readonly ITimeLimitedDataProtector _dataProtector;
Microsoft.AspNetCore.DataProtection.Extensions (16)
DataProtectionAdvancedExtensions.cs (10)
23public static byte[] Protect(this ITimeLimitedDataProtector protector, byte[] plaintext, TimeSpan lifetime) 39public static string Protect(this ITimeLimitedDataProtector protector, string plaintext, DateTimeOffset expiration) 56public static string Protect(this ITimeLimitedDataProtector protector, string plaintext, TimeSpan lifetime) 65/// Converts an <see cref="IDataProtector"/> into an <see cref="ITimeLimitedDataProtector"/> 69/// <returns>An <see cref="ITimeLimitedDataProtector"/>.</returns> 70public static ITimeLimitedDataProtector ToTimeLimitedDataProtector(this IDataProtector protector) 74return (protector as ITimeLimitedDataProtector) ?? new TimeLimitedDataProtector(protector); 88public static string Unprotect(this ITimeLimitedDataProtector protector, string protectedData, out DateTimeOffset expiration) 102private readonly ITimeLimitedDataProtector _innerProtector; 104public TimeLimitedWrappingProtector(ITimeLimitedDataProtector innerProtector)
ITimeLimitedDataProtector.cs (5)
21/// Creates an <see cref="ITimeLimitedDataProtector"/> given a purpose. 24/// The purpose to be assigned to the newly-created <see cref="ITimeLimitedDataProtector"/>. 26/// <returns>An <see cref="ITimeLimitedDataProtector"/> tied to the provided purpose.</returns> 29/// different <see cref="ITimeLimitedDataProtector"/> instances created with two different <paramref name="purpose"/> 33new ITimeLimitedDataProtector CreateProtector(string purpose);
TimeLimitedDataProtector.cs (1)
29public ITimeLimitedDataProtector CreateProtector(string purpose)
Microsoft.AspNetCore.DataProtection.Extensions.Tests (4)
DataProtectionAdvancedExtensionsTests.cs (4)
22var mockDataProtector = new Mock<ITimeLimitedDataProtector>(); 38var mockDataProtector = new Mock<ITimeLimitedDataProtector>(); 61var mockDataProtector = new Mock<ITimeLimitedDataProtector>(); 85var mockDataProtector = new Mock<ITimeLimitedDataProtector>();