Skip to content
This repository has been archived by the owner on Dec 14, 2017. It is now read-only.

Commit

Permalink
rename verification key stale duration to verification key lifetime
Browse files Browse the repository at this point in the history
  • Loading branch information
brockallen committed Jul 25, 2014
1 parent 24c2fbb commit f674c14
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public void TestDefaults()
Assert.AreEqual(true, settings.AllowAccountDeletion);
Assert.AreEqual(0, settings.PasswordHashingIterationCount);
Assert.AreEqual(0, settings.PasswordResetFrequency);
Assert.AreEqual(TimeSpan.FromMinutes(20), settings.VerificationKeyStaleDuration);
Assert.AreEqual(TimeSpan.FromMinutes(20), settings.VerificationKeyLifetime);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -1965,7 +1965,7 @@ protected virtual bool IsVerificationKeyStale(TAccount account)
return true;
}

if (account.VerificationKeySent < UtcNow.Subtract(Configuration.VerificationKeyStaleDuration))
if (account.VerificationKeySent < UtcNow.Subtract(Configuration.VerificationKeyLifetime))
{
return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public MembershipRebootConfiguration(SecuritySettings securitySettings)
this.AllowAccountDeletion = securitySettings.AllowAccountDeletion;
this.PasswordHashingIterationCount = securitySettings.PasswordHashingIterationCount;
this.PasswordResetFrequency = securitySettings.PasswordResetFrequency;
this.VerificationKeyStaleDuration = securitySettings.VerificationKeyStaleDuration;
this.VerificationKeyLifetime = securitySettings.VerificationKeyLifetime;

this.Crypto = new DefaultCrypto();
}
Expand All @@ -46,7 +46,7 @@ public MembershipRebootConfiguration(SecuritySettings securitySettings)
public bool AllowAccountDeletion { get; set; }
public int PasswordHashingIterationCount { get; set; }
public int PasswordResetFrequency { get; set; }
public TimeSpan VerificationKeyStaleDuration { get; set; }
public TimeSpan VerificationKeyLifetime { get; set; }

AggregateValidator<TAccount> usernameValidators = new AggregateValidator<TAccount>();
public void RegisterUsernameValidator(params IValidator<TAccount>[] items)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ static SecuritySettings GetConfigSection()
private const string ALLOWACCOUNTDELETION = "allowAccountDeletion";
private const string PASSWORDHASHINGITERATIONCOUNT = "passwordHashingIterationCount";
private const string PASSWORDRESETFREQUENCY = "passwordResetFrequency";
private const string VERIFICATIONKEYSTALEDURATIONMINUTES = "verificationKeyStaleDurationMinutes";
private const string VERIFICATIONKEYLIFETIME = "verificationKeyLifetime";

[ConfigurationProperty(MULTITENANT, DefaultValue = MembershipRebootConstants.SecuritySettingDefaults.MultiTenant)]
public bool MultiTenant
Expand Down Expand Up @@ -130,11 +130,11 @@ public int PasswordResetFrequency
set { this[PASSWORDRESETFREQUENCY] = value; }
}

[ConfigurationProperty(VERIFICATIONKEYSTALEDURATIONMINUTES, DefaultValue = MembershipRebootConstants.SecuritySettingDefaults.VerificationKeyStaleDuration)]
public TimeSpan VerificationKeyStaleDuration
[ConfigurationProperty(VERIFICATIONKEYLIFETIME, DefaultValue = MembershipRebootConstants.SecuritySettingDefaults.VerificationKeyLifetime)]
public TimeSpan VerificationKeyLifetime
{
get { return (TimeSpan)this[VERIFICATIONKEYSTALEDURATIONMINUTES]; }
set { this[VERIFICATIONKEYSTALEDURATIONMINUTES] = value; }
get { return (TimeSpan)this[VERIFICATIONKEYLIFETIME]; }
set { this[VERIFICATIONKEYLIFETIME] = value; }
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class SecuritySettingDefaults
internal const bool AllowAccountDeletion = true;
internal const int PasswordHashingIterationCount = 0;
internal const int PasswordResetFrequency = 0;
internal const string VerificationKeyStaleDuration = "00:20:00";
internal const string VerificationKeyLifetime = "00:20:00";
}

public class UserAccount
Expand Down

0 comments on commit f674c14

Please # to comment.