Comments (12)
System.InvalidOperationException: You must either set a ScopeName or set an introspection HTTP handler
at IdentityModel.AspNetCore.OAuth2Introspection.OAuth2IntrospectionMiddleware..ctor(RequestDelegate next, IOptions1 options, UrlEncoder urlEncoder, ILoggerFactory loggerFactory, IDistributedCache cache) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Microsoft.Extensions.Internal.ActivatorUtilities.ConstructorMatcher.CreateInstance(IServiceProvider provider) at Microsoft.Extensions.Internal.ActivatorUtilities.CreateInstance(IServiceProvider provider, Type instanceType, Object[] parameters) at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass3_0.b__0(RequestDelegate next) at Microsoft.AspNetCore.Builder.Internal.ApplicationBuilder.Build() at IdentityServer4.AccessTokenValidation.IdentityServerAuthenticationMiddleware..ctor(RequestDelegate next, IApplicationBuilder app, CombinedAuthenticationOptions options, ILogger
1 logger)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.Extensions.Internal.ActivatorUtilities.ConstructorMatcher.CreateInstance(IServiceProvider provider)
at Microsoft.Extensions.Internal.ActivatorUtilities.CreateInstance(IServiceProvider provider, Type instanceType, Object[] parameters)
at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass3_0.b__0(RequestDelegate next)
at Microsoft.AspNetCore.Builder.Internal.ApplicationBuilder.Build()
at Microsoft.AspNetCore.Hosting.Internal.WebHost.BuildApplication()
from identityserver4.accesstokenvalidation.
you need to set the ApiName
from identityserver4.accesstokenvalidation.
the exception message is wrong though.
from identityserver4.accesstokenvalidation.
thanks
from identityserver4.accesstokenvalidation.
Thats only needed for introspection though
from identityserver4.accesstokenvalidation.
Problem comes from the https://github.com/IdentityModel/IdentityModel.AspNetCore.OAuth2Introspection
If you want, I could fix this and do a pull request
Greetings Damien
from identityserver4.accesstokenvalidation.
Fixed by validating that if one is set that the other also needs to be set.
from identityserver4.accesstokenvalidation.
@brockallen Why did you close this, bug is that the Exception message in incorrect as @leastprivilege said.
from identityserver4.accesstokenvalidation.
We fixed the message on the dev branch
from identityserver4.accesstokenvalidation.
@leastprivilege @brockallen Also noticed that you re-implemented my pull request yourself, why ClientId and not ApiName, otherwise the user will not know that the ApiName needs to be set.
from identityserver4.accesstokenvalidation.
we do the error handling now in the top level middleware. In the middle of releasing rc4-update1. Will start to make more sense in an hour ;)
from identityserver4.accesstokenvalidation.
ah ok, thanks for the feedback
Greetings Damien
from identityserver4.accesstokenvalidation.
Related Issues (20)
- Does IdentityServer4.AccessTokenValidation only works in IdentityServer 4 ? HOT 5
- IConfigureOptions<IdentityServerAuthenticationOptions>.Configure() isn't automatically called. HOT 7
- Expose OAuth2IntrospectionEvents in IdentityServerAuthenticationOptions HOT 1
- Exception does not show anything in logs ( try/finally)-IdentityServerAuthenticationHandler HOT 4
- Why are IdentityServerAuthenticationDefaults internal? HOT 1
- Does it work with .net framework 4.7.2? HOT 2
- Support opaque tokens with a dot when used together with JWT HOT 4
- when i upgrade to identitymode version 4 HOT 4
- v3.0.0版本中仍然使用了preview组件
- Is .NETStandard still supported? HOT 3
- Spelling error on documentation comment HOT 2
- Send extra parameters on reference token validation HOT 4
- How to delete a reference token from API in distributed cache? HOT 2
- How does caching (reference token validation) work? I need to invalidate cache when user resets the password. Please help. HOT 3
- IdentityServer4.AccessTokenValidation: The SSL connection could not be established HOT 5
- ConfigureJwtBearer hardcodes MapInboundClaims to false, NameIdentifier is Null IdentityServer, Sub not mapped to NameIdentifier HOT 5
- Any reason why updated version of this library can't stay .netstandard20 or 21? HOT 3
- Get ServiceProvider inside AddOpenIdConnect without BuildServiceProvider HOT 1
- Unable to configure httpClient of HttpDocumentRetriever. HOT 2
- Automatic scope validation? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from identityserver4.accesstokenvalidation.