Git Product home page Git Product logo

Comments (11)

brockallen avatar brockallen commented on May 30, 2024

Is the scope middleware configured with an array of strings or something else for the scopes?

from identityserver3.membershipreboot.

kylegalbraith avatar kylegalbraith commented on May 30, 2024

Are you referring to the RequiredScopes for the API or the actual scopes defined within IdentityServer?

app.UseIdentityServerBearerTokenAuthentication(new IdentityServerBearerTokenAuthenticationOptions
{
     Authority = idProviderUrl,
     RequiredScopes = new[] { "MyAPI" }
});

from identityserver3.membershipreboot.

brockallen avatar brockallen commented on May 30, 2024

Yes, please try string[].

from identityserver3.membershipreboot.

kylegalbraith avatar kylegalbraith commented on May 30, 2024

Still get the exception....

string[] scopes = {"MyAPI"};
app.UseIdentityServerBearerTokenAuthentication(new IdentityServerBearerTokenAuthenticationOptions
{
      Authority = idProviderUrl,
      RequiredScopes = scopes
});

from identityserver3.membershipreboot.

brockallen avatar brockallen commented on May 30, 2024

Are you loading from NuGet or MyGet? What's the package ID and source? // @leastprivilege

from identityserver3.membershipreboot.

kylegalbraith avatar kylegalbraith commented on May 30, 2024

Loading from Nuget. IdentityServer package ID is Thinktecture.IdentityServer3 and I am also using Thinktecture.IdentityServer3.MembershipReboot gotten from Nuget as well.

It is worth noting that I have a class library that holds the CustomConfig, CustomDatabase, CustomUser, and interfaces that is then referenced in both my API and in my IdentityServer project. Within this class library I make use of the BrockAllen.MembershipReboot and BrockAllen.MembershipReboot.Ef

from identityserver3.membershipreboot.

brockallen avatar brockallen commented on May 30, 2024

Ok, I'll try to repro when I get some time later this week.

from identityserver3.membershipreboot.

kylegalbraith avatar kylegalbraith commented on May 30, 2024

Thank you, if you need more details please let me know.

from identityserver3.membershipreboot.

brockallen avatar brockallen commented on May 30, 2024

Did this ever get sorted out?

from identityserver3.membershipreboot.

kylegalbraith avatar kylegalbraith commented on May 30, 2024

Yes, I ended up finding a way to mock the user service calls in my unit tests. Turns out there was no need to create the interfaces to this because you guys had already made life easy my making the methods virtual. Thanks for the awesome work @brockallen.

from identityserver3.membershipreboot.

brockallen avatar brockallen commented on May 30, 2024

Ok, sorry I didn't follow your original question. Glad you're all set now.

from identityserver3.membershipreboot.

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.