API end point returning “Authorization has been denied for this request.” when sending bearer token

前端 未结 3 1107
清酒与你
清酒与你 2021-02-04 05:08

I\'ve followed a tutorial to protect a Web API with OAuth in C#.

I\'m doing some tests and so far I\'ve been able to get the access token successfully from /token

3条回答
  •  南方客
    南方客 (楼主)
    2021-02-04 05:22

    Looks like the version of "System.IdentityModel.Tokens.Jwt" that co-exists with the other Owin assemblies is not proper.

    In case you're using "Microsoft.Owin.Security.Jwt" version 2.1.0, you ought to be using the "System.IdentityModel.Tokens.Jwt" assembly of version 3.0.2.

    From the package manager console, try:

    Update-Package System.IdentityModel.Tokens.Jwt -Version 3.0.2
    

提交回复
热议问题