阅读背景:

测试受[授权]保护的Web API控制器

来源:互联网 

I have just added token-based security to my Web API using ASP.net identity OWIN and OAuth 2. As a result of this I am getting 405 unauthorized error on all my tests. How can I mock the securitycontext. I've seen some samples where other have overridden the Thread.CurrentPrincipal but unsure if this is the correct way.I have just added token-based security to my We




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: