skoruba / IdentityServer4.Admin

The administration for the IdentityServer4 and Asp.Net Core Identity
MIT License
3.56k stars 1.15k forks source link

Connect Admin Api to the Admin UI #478

Open skoruba opened 4 years ago

skoruba commented 4 years ago

Currently, the Admin UI is connected to services directly from the controllers.

I am considering using Admin Api from Admin UI.

It will required some rewrite, but it should be cleaner solution.

Feedback is welcome. 👍

Thanks

danielmeza commented 4 years ago

That's great! This allow us to reduce the maintenance effort and will propagate new features across all system. Remember to use HttpClientFactory and Polly for reduce HTTP connection issues.

skoruba commented 4 years ago

Can you describe your idea with Polly?

b0 commented 4 years ago

@skoruba count on me when time comes for this rewrite...

Thank you

devployment commented 4 years ago

Would that mean in general, staying with MVC or going down the SPA route? If SPA would be an option, any thoughts on the frontend stack? Maybe it would be nice to bring some love to https://aurelia.io/

IMHO they deserve being used by great projects to showcase their stuff. :)

I have not too much experience with Aurelia, but would love to get my hands dirty if the time comes.

skoruba commented 4 years ago

I want to work still with MVC. Thanks

danielmeza commented 4 years ago

@devployment I have a lot of experience with aurelia, and it is a awesome JS framework, but it is JS. Although since the project is oriented to rest noting stop us to build a different UI stack. Personally I will chose something closed to the .net world like Blazor, but for now MVC is just fine.

skoruba commented 4 years ago

I agree with you @danielmeza - thanks for feedback. Maybe I will consider some rewrite but in the future, current solution with MVC is stable. 👍🏼

mehyaa commented 4 years ago

In my opinion Admin and Admin Api projects can be merged.

Connecting Admin to Api will cause unnecessary navigation, auth steps. That will cause unnecessary delay and complexity. Merging two projects into one and execute all the business logic in common services will be more simple.

Api endpoints can serve under a logical route base name like "/Api/*".

skoruba commented 4 years ago

@mehyaa I agree with you. This merge will required bigger rewrite, so I will work on this issue in Q3 of this year - help with this is really welcome. 👍

vicentt commented 4 years ago

Hey @skoruba! Do you want to merge the projects or use the Api on AdminUI for the moment?

raminassar commented 2 years ago

any progress on this?

skoruba commented 2 years ago

Unfortunately not, currently postponed, I am working on new features to Duende IdentityServer Admin UI.

jdmallen commented 1 year ago

Can you describe your idea with Polly?

@skoruba Not @danielmeza, but I know what he's talking about and fully agree. Since no one addressed your question: Polly is a 3rd party transient fault handling framework for .NET that is fully endorsed by Micsosoft, so much as that they introduced their own extension packages for Polly as part of .NET, including some to add retries and other forms of transient fault handling to the HttpClientFactory pattern.

The HttpClientFactory pattern along with Polly is the new and preferred way of injecting HttpClients into classes (over the old way of making it static, or worse, constructed with every instance). More here on using it with Polly.

Nick Chapsas (@Elfocrash) made a great and quick video recently on implementing it in a new .NET project if you want to dive in.