-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extract UI project for use in existing setups (v2) #779
Extract UI project for use in existing setups (v2) #779
Conversation
2.0.0-preview-beta1
…r detecting assembly version
… and seeding is probably out of scope of UI
…injection helpers
…n of endpoint routing
@skoruba This is it. Let me know if you see anything wrong! |
@Brice-xCIT - thanks for your PR, I will check it. 👍 |
Hey @Brice-xCIT - I switched this PR to |
Hi! Dang it, I seem to have branched out at the wrong place :( I will look into resolving the conflicts. |
…ure/extract-ui-package-v2-merge # Conflicts: # src/Skoruba.IdentityServer4.Admin.UI/Areas/AdminUI/Views/Home/Index.cshtml # src/Skoruba.IdentityServer4.Admin.UI/Areas/AdminUI/Views/Shared/_Layout.cshtml # src/Skoruba.IdentityServer4.Admin.UI/Helpers/StartupHelpers.cs # src/Skoruba.IdentityServer4.Admin.UI/Resources/Areas/AdminUI/Views/Configuration/ApiResource/Section/Label.fr.resx # src/Skoruba.IdentityServer4.Admin.UI/Resources/Areas/AdminUI/Views/Configuration/ApiScope.da.resx # src/Skoruba.IdentityServer4.Admin.UI/Resources/Areas/AdminUI/Views/Configuration/ApiScope.de.resx # src/Skoruba.IdentityServer4.Admin.UI/Resources/Areas/AdminUI/Views/Configuration/ApiScope.en.resx # src/Skoruba.IdentityServer4.Admin.UI/Resources/Areas/AdminUI/Views/Configuration/ApiScope.es.resx # src/Skoruba.IdentityServer4.Admin.UI/Resources/Areas/AdminUI/Views/Configuration/ApiScope.fa.resx # src/Skoruba.IdentityServer4.Admin.UI/Resources/Areas/AdminUI/Views/Configuration/ApiScope.fi.resx # src/Skoruba.IdentityServer4.Admin.UI/Resources/Areas/AdminUI/Views/Configuration/ApiScope.fr.resx # src/Skoruba.IdentityServer4.Admin.UI/Resources/Areas/AdminUI/Views/Configuration/ApiScope.pt.resx # src/Skoruba.IdentityServer4.Admin.UI/Resources/Areas/AdminUI/Views/Configuration/ApiScope.ru.resx # src/Skoruba.IdentityServer4.Admin.UI/Resources/Areas/AdminUI/Views/Configuration/ApiScope.sv.resx # src/Skoruba.IdentityServer4.Admin.UI/Resources/Areas/AdminUI/Views/Configuration/ApiScope.zh.resx # src/Skoruba.IdentityServer4.Admin.UI/Resources/Areas/AdminUI/Views/Configuration/ApiScope/Section/Label.da.resx # src/Skoruba.IdentityServer4.Admin.UI/Resources/Areas/AdminUI/Views/Configuration/ApiScope/Section/Label.de.resx # src/Skoruba.IdentityServer4.Admin.UI/Resources/Areas/AdminUI/Views/Configuration/ApiScope/Section/Label.en.resx # src/Skoruba.IdentityServer4.Admin.UI/Resources/Areas/AdminUI/Views/Configuration/ApiScope/Section/Label.es.resx # src/Skoruba.IdentityServer4.Admin.UI/Resources/Areas/AdminUI/Views/Configuration/ApiScope/Section/Label.fa.resx # src/Skoruba.IdentityServer4.Admin.UI/Resources/Areas/AdminUI/Views/Configuration/ApiScope/Section/Label.fi.resx # src/Skoruba.IdentityServer4.Admin.UI/Resources/Areas/AdminUI/Views/Configuration/ApiScope/Section/Label.fr.resx # src/Skoruba.IdentityServer4.Admin.UI/Resources/Areas/AdminUI/Views/Configuration/ApiScope/Section/Label.pt.resx # src/Skoruba.IdentityServer4.Admin.UI/Resources/Areas/AdminUI/Views/Configuration/ApiScope/Section/Label.ru.resx # src/Skoruba.IdentityServer4.Admin.UI/Resources/Areas/AdminUI/Views/Configuration/ApiScope/Section/Label.sv.resx # src/Skoruba.IdentityServer4.Admin.UI/Resources/Areas/AdminUI/Views/Configuration/ApiScope/Section/Label.zh.resx # src/Skoruba.IdentityServer4.Admin.UI/Resources/Areas/AdminUI/Views/Configuration/ApiScopeProperties.da.resx # src/Skoruba.IdentityServer4.Admin.UI/Resources/Areas/AdminUI/Views/Configuration/ApiScopeProperties.de.resx # src/Skoruba.IdentityServer4.Admin.UI/Resources/Areas/AdminUI/Views/Configuration/ApiScopeProperties.en.resx # src/Skoruba.IdentityServer4.Admin.UI/Resources/Areas/AdminUI/Views/Configuration/ApiScopeProperties.es.resx # src/Skoruba.IdentityServer4.Admin.UI/Resources/Areas/AdminUI/Views/Configuration/ApiScopeProperties.fa.resx # src/Skoruba.IdentityServer4.Admin.UI/Resources/Areas/AdminUI/Views/Configuration/ApiScopeProperties.fi.resx # src/Skoruba.IdentityServer4.Admin.UI/Resources/Areas/AdminUI/Views/Configuration/ApiScopeProperties.fr.resx # src/Skoruba.IdentityServer4.Admin.UI/Resources/Areas/AdminUI/Views/Configuration/ApiScopeProperties.pt.resx # src/Skoruba.IdentityServer4.Admin.UI/Resources/Areas/AdminUI/Views/Configuration/ApiScopeProperties.ru.resx # src/Skoruba.IdentityServer4.Admin.UI/Resources/Areas/AdminUI/Views/Configuration/ApiScopeProperties.sv.resx # src/Skoruba.IdentityServer4.Admin.UI/Resources/Areas/AdminUI/Views/Configuration/ApiScopeProperties.zh.resx # src/Skoruba.IdentityServer4.Admin.UI/Resources/Areas/AdminUI/Views/Configuration/ApiScopePropertyDelete.da.resx # src/Skoruba.IdentityServer4.Admin.UI/Resources/Areas/AdminUI/Views/Configuration/ApiScopePropertyDelete.de.resx # src/Skoruba.IdentityServer4.Admin.UI/Resources/Areas/AdminUI/Views/Configuration/ApiScopePropertyDelete.en.resx # src/Skoruba.IdentityServer4.Admin.UI/Resources/Areas/AdminUI/Views/Configuration/ApiScopePropertyDelete.es.resx # src/Skoruba.IdentityServer4.Admin.UI/Resources/Areas/AdminUI/Views/Configuration/ApiScopePropertyDelete.fa.resx # src/Skoruba.IdentityServer4.Admin.UI/Resources/Areas/AdminUI/Views/Configuration/ApiScopePropertyDelete.fi.resx # src/Skoruba.IdentityServer4.Admin.UI/Resources/Areas/AdminUI/Views/Configuration/ApiScopePropertyDelete.fr.resx # src/Skoruba.IdentityServer4.Admin.UI/Resources/Areas/AdminUI/Views/Configuration/ApiScopePropertyDelete.pt.resx # src/Skoruba.IdentityServer4.Admin.UI/Resources/Areas/AdminUI/Views/Configuration/ApiScopePropertyDelete.ru.resx # src/Skoruba.IdentityServer4.Admin.UI/Resources/Areas/AdminUI/Views/Configuration/ApiScopePropertyDelete.sv.resx # src/Skoruba.IdentityServer4.Admin.UI/Resources/Areas/AdminUI/Views/Configuration/ApiScopePropertyDelete.zh.resx # src/Skoruba.IdentityServer4.Admin.UI/Resources/Areas/AdminUI/Views/Log/AuditLog.da.resx # src/Skoruba.IdentityServer4.Admin.UI/Resources/Areas/AdminUI/Views/Log/AuditLog.es.resx # src/Skoruba.IdentityServer4.Admin.UI/Resources/Areas/AdminUI/Views/Log/AuditLog.fa.resx # src/Skoruba.IdentityServer4.Admin.UI/Resources/Areas/AdminUI/Views/Log/AuditLog.fr.resx # src/Skoruba.IdentityServer4.Admin.UI/Resources/Areas/AdminUI/Views/Log/AuditLog.ru.resx # src/Skoruba.IdentityServer4.Admin.UI/Resources/Areas/AdminUI/Views/Log/AuditLog.sv.resx # src/Skoruba.IdentityServer4.Admin.UI/Resources/Areas/AdminUI/Views/Log/AuditLog.zh.resx # src/Skoruba.IdentityServer4.Admin/Skoruba.IdentityServer4.Admin.csproj # src/Skoruba.IdentityServer4.Admin/Startup.cs
Conflicts are resolved for v2.x. |
@Brice-xCIT - thanks for your great work! I will check both version 👍 |
I've tested this version and everything work really great, even I've tried overwrite some resource, view and it works perfectly! |
I'm glad to hear it's working out well! :) I wouldn't be surprised if there were some minor hiccups there and there, or if the code could be further cleaned up or refactored. Also, I didn't do anything with regards to setting up the NuGet package. |
@Brice-xCIT - for sure, I will take a look at details. 👍 Do you think that similar thing we can do it with Admin.Api project in the future? Extract api controllers to separate package and reference it through the nuget package as well like UI? |
I think the same could be done without too many issues for the API - it is very symmetrically implemented. Maybe in the process some common types could be further extracted down to Admin.Shared. I won't have much time to work on the API in the coming months, though :/ |
@Brice-xCIT - For sure, I will check it and make some appropriate changes. 👍 |
is there any guide to use this feature? sorry for bumping this, I wasnt sure if opening a new issue just to ask this is right. UPDATE: found the following #770 |
@jotatoledo - Yep 😊 it is not documented yet. But in the branch called |
This PR enables consumers to use the UI with an existing IdentityServer4 environment, by letting arbitrary Startup code to inject the UI into an existing application's pipeline. This essentially solves issues #770, #409, #55, #322, #133 and maybe more.
services.AddIdentityServer4AdminUI(...)
,app.UseIdentityServer4AdminUI()
andendpoints.MapIdentityServer4AdminUI()
are now exposed, with a wide range of configuration options that support both option binding to appsettings and programmatic configuration.The UI is now provided as an area, which should allow it to be added to a single application alongside the STS. It should also be extensible since the project is a Razor Class Library. And of course using the UI in a standalone application is natural, as demonstrated by the Admin app.