Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/asp.net-core/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Asp.net core 无法将openiddict与Microsoft.AspNetCore.Authentication.jwt一起使用_Asp.net Core_Nuget_.net Core_Jwt_Openiddict - Fatal编程技术网

Asp.net core 无法将openiddict与Microsoft.AspNetCore.Authentication.jwt一起使用

Asp.net core 无法将openiddict与Microsoft.AspNetCore.Authentication.jwt一起使用,asp.net-core,nuget,.net-core,jwt,openiddict,Asp.net Core,Nuget,.net Core,Jwt,Openiddict,我有一个openiddict示例,但我想使用JWT。我了解到我不能将OAuth与JWT一起使用,因为它们是两种不同的东西。有道理 但是如果我想使用JWT,那么我需要安装一个承载令牌中间件包。我相信,对于.net core来说,它就是Microsoft.AspNetCore.Authentication.JwtBearer 但是我不能同时用openiddict安装这个包。我需要使用JWTBearner的特定版本才能使其正常工作吗 尝试安装时出现的错误是 Unable to resolve 'Ope

我有一个openiddict示例,但我想使用JWT。我了解到我不能将OAuth与JWT一起使用,因为它们是两种不同的东西。有道理

但是如果我想使用JWT,那么我需要安装一个承载令牌中间件包。我相信,对于.net core来说,它就是Microsoft.AspNetCore.Authentication.JwtBearer

但是我不能同时用openiddict安装这个包。我需要使用JWTBearner的特定版本才能使其正常工作吗

尝试安装时出现的错误是

Unable to resolve 'OpenIddict (>= 1.0.0)' for '.NETCoreApp,Version=v1.1'.
Unable to resolve 'OpenIddict.Mvc (>= 1.0.0)' for '.NETCoreApp,Version=v1.1'.
Unable to resolve 'OpenIddict.EntityFrameworkCore (>= 1.0.0)' for '.NETCoreApp,Version=v1.1'.
Openiddict包设置

<!-- OpenIdDict -->
<PackageReference Include="AspNet.Security.OAuth.Validation" Version="1.0.0-*" />
<PackageReference Include="OpenIddict" Version="1.0.0-*" />
<PackageReference Include="OpenIddict.EntityFrameworkCore" Version="1.0.0-*" />
<PackageReference Include="OpenIddict.Mvc" Version="1.0.0-*" />

NuGet配置

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
    <add key="aspnet-contrib" value="https://www.myget.org/F/aspnet-contrib/api/v3/index.json" />
  </packageSources>
</configuration>

请尝试在Package manager控制台中运行此操作:

安装程序包OpenIddict-版本1.0.0-beta2-0615-源代码

将此包源添加到Nuget包源:

错误指向没有找到myget或查看myget提要的包本身。它们确实在myget提要中,版本为:
1.0.0-beta2-0614
它们的目标是应完全兼容的.netstandard 1.4
AspNet.Security.OAuth.Validation
有1.0.0名字对象,但没有-或*确保您的Nuget管理器在筛选器上有全部而不是Nuget