Skip to content
This repository was archived by the owner on Dec 13, 2018. It is now read-only.

Commit f258724

Browse files
committed
#32 - Honor AuthenticationProperties.AllowRefresh.
1 parent a9e40ac commit f258724

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Microsoft.AspNet.Security.Cookies/CookieAuthenticationHandler.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@ protected override async Task<AuthenticationTicket> AuthenticateCoreAsync()
8888
return null;
8989
}
9090

91-
if (issuedUtc != null && expiresUtc != null && Options.SlidingExpiration)
91+
bool allowRefresh = ticket.Properties.AllowRefresh ?? true;
92+
if (issuedUtc != null && expiresUtc != null && Options.SlidingExpiration && allowRefresh)
9293
{
9394
TimeSpan timeElapsed = currentUtc.Subtract(issuedUtc.Value);
9495
TimeSpan timeRemaining = expiresUtc.Value.Subtract(currentUtc);

0 commit comments

Comments
 (0)