We have a web application using WIF and we are trying to implement sliding sessions. The code in use seems to be creating the new SessionToken correctly however I am still seeing the old SessionToken even after the new token has been created. There appears to be some latency between when the token is created and "made available."
void SessionAuthenticationModule_SessionSecurityTokenReceived(object sender, SessionSecurityTokenReceivedEventArgs e)
{
e.ReissueCookie = true;
e.SessionToken =
new SessionSecurityToken(
token.ClaimsPrincipal,
token.Context,
DateTime.UtcNow,
DateTime.UtcNow.Add(sessionDuration))
{
IsPersistent = token.IsPersistent,
IsReferenceMode = token.IsReferenceMode
};
}
My question is how long does it take for WIF to to reissue a token when it has been created programmatically?