Archive for the ‘owin’ Category

Simple, reference that:

 

using Microsoft.AspNet.Identity;

 

After you can see two extensions:

//get User Id
var CurrentUserId = User.Identity.GetUserId()
//get UserName
var CurrentUserName = User.Identity.GetUserName()

Enjoy it!

Advertisements