Git Product home page Git Product logo

Comments (5)

cbeall avatar cbeall commented on May 28, 2024

Just to help isolate the issue, removing the client console app from the equation, when the WebApi application goes through its startup, it should be calling the discovery endpoint. Is that happening?

from identityserver3.accesstokenvalidation.

kkfrosty avatar kkfrosty commented on May 28, 2024

Thank you for the response Craig. Everything is hosted local so I don't think a sniff is going to detect this. I cleared the Identity Server log and just opened a link in a browser. (Didn't have a token obviously but trying to see if there is anything logged between the server and api.)

In my custom Authorize class, I just return true from the IsAuthorized class so any call passes authorization for testing. I make the WebApi directly from the browser and I see nothing in the Idenity Server log.

How else would you go about trying to see if the call is being made? Note I did change the Authority property to point to a bogus URL just so I could run wireshark and see if an attempt was mad to call the made up URL but I saw nothing.

Having said that if I change the host for the WebApi to IIS Express, then I have verified the Startup is running and all the settings are getting made.

Update:
cbeall, I did some more testing, I notice that if you open discovery page, a Start discovery request is logged. So I can say that the WebApi is never making that call.

from identityserver3.accesstokenvalidation.

cbeall avatar cbeall commented on May 28, 2024

OK... then something is probably not right with settings between web api application and the application running IDS3. You might want to pull the AccessTokenValidation repo down, hook that up to your web api application, and just step through it to troubleshoot. I would have expected an exception to occur during startup, but I'm not exactly sure about that.

Also if it helps, if you don't want to depend on logs, you can add a use statement to middleware before adding IdentityServer and set a breakpoint on the return next().

app.Use((context, next) =>
{
    return next();
});

from identityserver3.accesstokenvalidation.

kkfrosty avatar kkfrosty commented on May 28, 2024

cbeal, FYI. I actually spent a lot of time on this, mainly coming up with a way to get WCF to support JWT. The solution has a WebApi call as well, I've used the same code from it. Here's a link to the article. https://kkfrost.wordpress.com/2015/03/05/identity-server-v3-lob-part-2-web-api-wcf-service-integration/
From what I recall, WebApi was fairly simple.

FYI. our IDS3 server is hosted in IIS and again see the above that it's working with our MVC app & Wcf services using the methods in the blog posts above.

from identityserver3.accesstokenvalidation.

kkfrosty avatar kkfrosty commented on May 28, 2024

Ok, cbeal, I downloaded the AccessTokenValidation project. I removed the nuget package and added a project reference. Long story short, this worked. So I went back to NuGet to reinstall the package and noticed there is a new one released this month. Namespace is different and I installed that instead of the Thinktecture version from earlier this year.

For whatever reason, everything appears to be working. I have no idea why and this WebApi project is new and nothing other than a controller with a test action in it.

I wish I could share the technical reason for getting this to work. I will note again though I think you will see a Start Token request validation if AccessTokenValidation is working.

from identityserver3.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.