IdentityServer4 icon indicating copy to clipboard operation
IdentityServer4 copied to clipboard

Refactoring?

Open michael-x opened this issue 10 years ago • 6 comments

I was wondering how open you are towards refactoring (especially if you would get a helping hand for that). There are several areas where the current implementation doesn't lend itself to help consumers to use it intuitively. Some of things that occurred to me analyzing the code:

  • There should be a clearer separation between transient and persistent data storage (e.g. separate namespaces and/or separate assemblies).
  • It might make sense to split the entire project into multiple projects, e.g. one for endpoints, one for UI services, one for transient data abstractions, one for persistent data abstractions, etc. This can help later on keeping certain parts stable (e.g. data abstractions) while you can freely perform bug-fixes in other areas. A consumer also wouldn't need to bring the endpoint code into his UI implementation and vice versa.
  • I've noticed that HttpContext and IdentityServerContext are used inconsistently. E.g. sometimes an HttpContext is injected and an IdentityServerContext (which wraps around the HttpContext) is passed in as a parameter. Both HttpContext and the IdentityServerOptions are available via the DI system. Most of the times where the IdentityServerContext is passed in, actually only the HttpContext is really used. It might make sense to just consume the HttpContext and/or IdentityServerOptions, whichever is needed at the time. There is only one method (GetIdentityServerUser) which actually really uses the IdentityServerContext.

michael-x avatar Aug 15 '16 07:08 michael-x

Thanks for the help!

We know that right now there is a lot of cleanup to do - as well as feature work. Brock and will sit down for the next 3 weeks to get that done.

There will be an RC early September that I encourage you to have a look at (or follow the check ins over the coming weeks) - if you still think we can do more cleanup - let us know and we can start a discussion.

leastprivilege avatar Aug 15 '16 08:08 leastprivilege

If you need a hand, let me (or my alter ego @mpoettgen) know.

michael-x avatar Aug 15 '16 08:08 michael-x

Ok, I think we have either addressed all of these issues, or we have plans for them (like adding a new "quick start" project). Have a look. Thanks.

brockallen avatar Aug 26 '16 18:08 brockallen

Are you going to summarize all that has changed prior to RC1 so that we can upgrade our products accordingly?

klanglie avatar Aug 26 '16 19:08 klanglie

If all goes well with the automated release notes - there will be a list of closed issues and merged PRs for RC1. But nothing beyond that.

It's always fun on the bleeding edge ;)

leastprivilege avatar Aug 26 '16 19:08 leastprivilege

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

lock[bot] avatar Jan 15 '20 16:01 lock[bot]