#32 - Honor AuthenticationProperties.AllowRefresh.

This commit is contained in:
Chris Ross 2014-09-09 16:38:06 -07:00
parent a9e40ac895
commit f258724cbd
1 changed files with 2 additions and 1 deletions

View File

@ -88,7 +88,8 @@ namespace Microsoft.AspNet.Security.Cookies
return null;
}
if (issuedUtc != null && expiresUtc != null && Options.SlidingExpiration)
bool allowRefresh = ticket.Properties.AllowRefresh ?? true;
if (issuedUtc != null && expiresUtc != null && Options.SlidingExpiration && allowRefresh)
{
TimeSpan timeElapsed = currentUtc.Subtract(issuedUtc.Value);
TimeSpan timeRemaining = expiresUtc.Value.Subtract(currentUtc);