public Response OnBeforeRequest(NancyContext context, IDictionary <string, object> logData) { var currentUser = _authValidator.GetUserFromContext(context); context.CurrentUser = currentUser; logData["User"] = currentUser; return(null); }
public Response OnBeforeRequest(NancyContext context, IDictionary <string, object> logData) { var currentUser = _authValidator.GetUserFromContext(context); context.CurrentUser = currentUser; logData["User"] = new { UserId = currentUser.GetUserId(), Name = currentUser.GetUserName(), ExpirationTime = currentUser.GetExpirationTime(), Valid = currentUser.IsValid() }; return(null); }