ASP MVC 4使用身份验证令牌获取用户详细信息

时间:2017-08-31 09:27:33

标签: c# asp.net-mvc-4

我找到了answer 但我不太清楚,对不起,我是asp的完全菜鸟。因此,在我成功登录后,我已经从服务器获得了授权令牌。现在我的问题是可以使用身份验证令牌获取用户数据,例如用户名,用户的名字和姓氏。到目前为止我所拥有的是

[HttpPost]
public ActionResult AuthenticateToken()
{
   string authToken = Request.Form["AuthenticationToken"];
   if (authToken.IsNullOrEmtpy())
   {
      throw new InvalidOperationException("Unknown authentication token");
   }

  // now get the user data from the api using the auth token here...
}

我希望我的问题有道理。谢谢。

0 个答案:

没有答案
相关问题