In the asp.net vnext, I am getting the user claims in the Controller using the following code:
var claimsIdentity = User.Identity as ClaimsIdentity;
var c = claimsIdentity.FindFirst(ClaimTypes.Name);
var temp = c.Value.ToString();
but using the same, I could not get it in my class (which used to store in DB). I am getting the following error (in User) as
The name 'User' does not exist in the current context
I tried Thread.CurrentPrincipal without success. Any help?