简体   繁体   English

不包含文档中是否包含的定义

[英]does not contain a definition for if contains by documentation

I installed System.IdentityModel.Tokens.Jwt via Nuget. 我通过Nuget安装了System.IdentityModel.Tokens.Jwt。

Update-Package –reinstall System.IdentityModel.Tokens.Jwt

I need to use the class TokenValidationParameters . 我需要使用TokenValidationParameters类。 When I do I get this error: 当我收到此错误时:

'System.IdentityModel.Tokens.TokenValidationParameters' does not contain a definition
    for 'AudienceUriMode'
'System.IdentityModel.Tokens.TokenValidationParameters' does not contain a definition
    for 'SigningToken'

but according to the documentation there, I tried to reinstall. 但是根据那里的文档,我尝试重新安装。 I have System.IdentityModel.Tokens.Jwt version 4.0. 我有System.IdentityModel.Tokens.Jwt版本4.0。

I also have another error. 我也有另一个错误。 I can't use JwtSecurityToken Constructor (String, String, IEnumerable, Lifetime, SigningCredentials) . 我不能使用JwtSecurityToken构造函数(String,String,IEnumerable,Lifetime,SigningCredentials) Any Idea what the problem is? 任何想法是什么问题?

Answered by leastprivilege 最低特权回答

specify a scope in your OAuth request 在OAuth请求中指定范围

https://github.com/thinktecture/Thinktecture.IdentityServer.v2/issues/600 https://github.com/thinktecture/Thinktecture.IdentityServer.v2/issues/600

Hope this answers your question 希望这能回答您的问题

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM