Validate OAuth bearer token with form post

。_饼干妹妹 提交于 2019-12-03 21:57:12

Then you need to un-protect the token, then from the "ticket" you check if there is principal and if it is authenticated (check property IsAuthenticated). Use the code below inside your controller:

string token = "Your token goes here";
Microsoft.Owin.Security.AuthenticationTicket ticket = Startup.OAuthBearerOptions.AccessTokenFormat.Unprotect(token);
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!