1 implementation of ITimeLimitedDataProtector
Microsoft.AspNetCore.DataProtection.Extensions (1)
TimeLimitedDataProtector.cs (1)
17
internal sealed class TimeLimitedDataProtector :
ITimeLimitedDataProtector
34 references to ITimeLimitedDataProtector
Microsoft.AspNetCore.Components.Endpoints (4)
Builder\OpaqueRedirection.cs (3)
44
var
protector = CreateProtector(httpContext);
74
var
protector = CreateProtector(httpContext);
96
private static
ITimeLimitedDataProtector
CreateProtector(HttpContext httpContext)
DependencyInjection\ServerComponentSerializer.cs (1)
12
private readonly
ITimeLimitedDataProtector
_dataProtector;
Microsoft.AspNetCore.Components.Endpoints.Tests (8)
EndpointHtmlRendererTest.cs (8)
300
var
protector = _dataprotectorProvider.CreateProtector(ServerComponentSerializationSettings.DataProtectionProviderPurpose)
332
var
protector = _dataprotectorProvider.CreateProtector(ServerComponentSerializationSettings.DataProtectionProviderPurpose)
393
var
protector = _dataprotectorProvider.CreateProtector(ServerComponentSerializationSettings.DataProtectionProviderPurpose)
450
var
protector = _dataprotectorProvider.CreateProtector(ServerComponentSerializationSettings.DataProtectionProviderPurpose)
489
var
protector = _dataprotectorProvider.CreateProtector(ServerComponentSerializationSettings.DataProtectionProviderPurpose)
528
var
protector = _dataprotectorProvider.CreateProtector(ServerComponentSerializationSettings.DataProtectionProviderPurpose)
579
var
protector = _dataprotectorProvider.CreateProtector(ServerComponentSerializationSettings.DataProtectionProviderPurpose)
1054
var
protector = _dataprotectorProvider.CreateProtector(ServerComponentSerializationSettings.DataProtectionProviderPurpose)
Microsoft.AspNetCore.Components.Server.Tests (2)
Circuits\ServerComponentDeserializerTest.cs (1)
14
private readonly
ITimeLimitedDataProtector
_protector;
src\Components\Endpoints\src\DependencyInjection\ServerComponentSerializer.cs (1)
12
private readonly
ITimeLimitedDataProtector
_dataProtector;
Microsoft.AspNetCore.DataProtection.Extensions (16)
DataProtectionAdvancedExtensions.cs (10)
23
public static byte[] Protect(this
ITimeLimitedDataProtector
protector, byte[] plaintext, TimeSpan lifetime)
39
public static string Protect(this
ITimeLimitedDataProtector
protector, string plaintext, DateTimeOffset expiration)
56
public 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>
70
public static
ITimeLimitedDataProtector
ToTimeLimitedDataProtector(this IDataProtector protector)
74
return (protector as
ITimeLimitedDataProtector
) ?? new TimeLimitedDataProtector(protector);
88
public static string Unprotect(this
ITimeLimitedDataProtector
protector, string protectedData, out DateTimeOffset expiration)
102
private readonly
ITimeLimitedDataProtector
_innerProtector;
104
public 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"/>
33
new
ITimeLimitedDataProtector
CreateProtector(string purpose);
TimeLimitedDataProtector.cs (1)
29
public
ITimeLimitedDataProtector
CreateProtector(string purpose)
Microsoft.AspNetCore.DataProtection.Extensions.Tests (4)
DataProtectionAdvancedExtensionsTests.cs (4)
22
var mockDataProtector = new Mock<
ITimeLimitedDataProtector
>();
38
var mockDataProtector = new Mock<
ITimeLimitedDataProtector
>();
61
var mockDataProtector = new Mock<
ITimeLimitedDataProtector
>();
85
var mockDataProtector = new Mock<
ITimeLimitedDataProtector
>();