I use MVC4 web application with Web API. I want to create an action filter, and I want to know which user (a logged-in user) made the action. How can I do it?
public class ModelActionLog : ActionFilterAttribute
{
public override void OnActionExecuting(SHttpActionContext actionContext)
{
string username = ??
}
public override void OnActionExecuted(HttpActionExecutedContext actionExecutedContext)
{
??
}
}