Giter Club home page Giter Club logo

Comments (12)

damienbod avatar damienbod commented on August 10, 2024

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, ILogger1 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.

leastprivilege avatar leastprivilege commented on August 10, 2024

you need to set the ApiName

from identityserver4.accesstokenvalidation.

leastprivilege avatar leastprivilege commented on August 10, 2024

the exception message is wrong though.

from identityserver4.accesstokenvalidation.

damienbod avatar damienbod commented on August 10, 2024

thanks

from identityserver4.accesstokenvalidation.

leastprivilege avatar leastprivilege commented on August 10, 2024

Thats only needed for introspection though

from identityserver4.accesstokenvalidation.

damienbod avatar damienbod commented on August 10, 2024

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.

brockallen avatar brockallen commented on August 10, 2024

Fixed by validating that if one is set that the other also needs to be set.

from identityserver4.accesstokenvalidation.

damienbod avatar damienbod commented on August 10, 2024

@brockallen Why did you close this, bug is that the Exception message in incorrect as @leastprivilege said.

from identityserver4.accesstokenvalidation.

brockallen avatar brockallen commented on August 10, 2024

We fixed the message on the dev branch

from identityserver4.accesstokenvalidation.

damienbod avatar damienbod commented on August 10, 2024

@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.

leastprivilege avatar leastprivilege commented on August 10, 2024

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.

damienbod avatar damienbod commented on August 10, 2024

ah ok, thanks for the feedback

Greetings Damien

from identityserver4.accesstokenvalidation.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.