TokenValidationParameters no longer working after upgrade to 5.0.0

后端 未结 5 823
梦谈多话
梦谈多话 2020-12-24 04:39

I have the following code which was working when I was using System.IdentityModel.Tokens.Jwt, Version=4.0.20622.1351

private static void Co         


        
5条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-24 05:31

    Short version: Make sure you use version 4.0 or later of the Microsoft.Owin packages, such as Microsoft.Owin.Security.Jwt.


    As the other answers mentioned, there was a breaking change in System.IdentityModel.Tokens.Jwt from version 4.0 to 5.0. This caused problems because some packages like Microsoft.IdentityModel.Protocols depended on version 5.0, while older Katana/OWIN packages like Microsoft.Owin.Security.Jwt were still hardcoded to depend on version 4.0.

    The good news is that this is being fixed in the new Katana 4.0 release. The 4.0 packages (such as Jwt and Cookies) have been published to NuGet as prerelease packages and will be available as stable packages soon.

提交回复
热议问题