首页 > Windows开发 > 详细

Jwt访问api提示401错误 Authorization has been denied for this request

时间:2019-02-19 14:01:44      阅读:630      评论:0      收藏:0      [点我收藏+]

教程  http://bitoftech.net/2015/02/16/implement-oauth-json-web-tokens-authentication-in-asp-net-web-api-and-identity-2/   

源码  https://github.com/ChuckTest/AspNetWebApi2/

对应到commit的编号25df01a25c0aa8cada67474c3788272cace428db

 

发现是忘记step 6了

Step 6: Consume JSON Web Tokens

Now if we tried to obtain an access token by sending a request to the end point “oauth/token” then try to access one of the protected end points we’ll receive 401 Unauthorized status, the reason for this that our API doesn’t understand those JWT tokens issued by our API yet, to fix this we need to the following:

 

Jwt访问api提示401错误 Authorization has been denied for this request

原文:https://www.cnblogs.com/chucklu/p/10400646.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!