#32 - Honor AuthenticationProperties.AllowRefresh.
This commit is contained in:
parent
a9e40ac895
commit
f258724cbd
|
|
@ -88,7 +88,8 @@ namespace Microsoft.AspNet.Security.Cookies
|
||||||
return null;
|
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 timeElapsed = currentUtc.Subtract(issuedUtc.Value);
|
||||||
TimeSpan timeRemaining = expiresUtc.Value.Subtract(currentUtc);
|
TimeSpan timeRemaining = expiresUtc.Value.Subtract(currentUtc);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue