/// <summary> /// Inserts a new user authentication history. /// </summary> /// <param name="history"></param> protected override void InsertUserHistory(AuthenticationHistory history) { TableProxyAuthenticationHistoryByUserName.Insert(history); if (history.UserSession != null && !history.UserSession.RenewalToken.Equals(Guid.Empty)) { TableProxyAuthenticationHistoryByToken.InsertOrUpdate(history); } }
/// <summary> /// Gets the authentication history for a specific session. /// </summary> /// <param name="session"></param> /// <returns></returns> protected override AuthenticationHistory GetSessionAuthenticationHistory(UserSession session) { var item = TableProxyAuthenticationHistoryByToken.Get("ByToken", session.RenewalToken.ToString().GetValidRowKey()); return(item == null ? null : item.Entity); }