Share via


DataProtectionBuilderExtensions.SetDefaultKeyLifetime Method

Definition

Sets the default lifetime of keys created by the data protection system.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::DataProtection::IDataProtectionBuilder ^ SetDefaultKeyLifetime(Microsoft::AspNetCore::DataProtection::IDataProtectionBuilder ^ builder, TimeSpan lifetime);
public static Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder SetDefaultKeyLifetime (this Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder builder, TimeSpan lifetime);
static member SetDefaultKeyLifetime : Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder * TimeSpan -> Microsoft.AspNetCore.DataProtection.IDataProtectionBuilder
<Extension()>
Public Function SetDefaultKeyLifetime (builder As IDataProtectionBuilder, lifetime As TimeSpan) As IDataProtectionBuilder

Parameters

lifetime
TimeSpan

The lifetime (time before expiration) for newly-created keys. See NewKeyLifetime for more information and usage notes.

Returns

A reference to the IDataProtectionBuilder after this operation has completed.

Applies to