DEV Community

Discussion on: Setting up an Authorization Server with OpenIddict - Part III - Client Credentials Flow

Collapse
 
two_kids_in_a_trenchcoat profile image
Peter Wone • Edited

I wonder could you expand a little on how you got to that "GET NEW ACCESS TOKEN" UI in Postman. I've installed it but never used it and I can't figure out how to follow your instructions from that point. UPDATE I figured it out but others would probably appreciate knowing how to do the test.

Collapse
 
robinvanderknaap profile image
Robin van der Knaap

Hi Peter,

Here's an article which covers all you need to know about setting authorization headers for Postman requests: learning.postman.com/docs/sending-...

Focus on this part specifically: learning.postman.com/docs/sending-...

Collapse
 
luisapplivity profile image
LuisApplivity

Hi Peter Wone,

It is "hidden" in the "Authorization" tab. After you click on it, select "OAuth 2.0" for the "Type" dropdown box.

To illustrate this, here's a simple picture with everything:
Image description

I believe this tiny bit should be added to Part III of this guide. It will avoid a HUGE time loss for many. Those already familiar with Postman probably can't tell how important a step this is.

This aside, this is an excellent guide, Robin! Thank you for making it so skillfully, thoughtfully and for keeping it both simple and easy to follow.

The only other suggestion I could give, though, would be to include steps on how to use OpenIddict with NHibernate instead, which is a much more robust, compatible and problem-free ORM than both Entity Framework and EFCore. There's currently no guide for this that I could tell, and since OpenIddict doesn't support it out-of-the-box, it might be a guide in and of itself (a "Part VII" for this guide, if you will).

Thank you!

Collapse
 
luisapplivity profile image
LuisApplivity

Just wanted to leave a 2025 update to potential readers who might stumble upon this: someone has made an NHibernate implementation for OpenIddict (tested against v6.0.0), and it should be simple to use, although it may or may not need some bug fixes to work right: GitHub link.

Make sure to compile its NuGet package yourself (it's easy, no code modifications required), as it's not currently hosted on NuGet's website anymore.

Happy coding to everyone!