예제 #1
0
 /// <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);
     }
 }
예제 #2
0
        /// <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);
        }