DataProtectionBuilderExtensions.SetDefaultKeyLifetime Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
- builder
- IDataProtectionBuilder
- 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.