ASP.NET Web API – Identifier of the Identity from Membership Provider

I saw this rather interesting question in StackOverflow. Thought I’ll try to answer it in the form of a post here. Okay, the question is how to access the identifier of the identity established by FormsAuthentication (ASP.NET Membership Provider). I’m not going to discuss the suitability of Forms Authentication for Web API but just try to get a solution to the problem.
Continue reading