Headless UI API Architecture #3
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Headless UI API Architecture and .NET 9.0 Upgrade
Overview
This PR introduces a major architectural refactoring of IdentityManager2, separating concerns between API and UI layers while upgrading the entire solution to .NET 9.0.
Key Changes
1. Headless UI API Layer
IdentityManager2.Apisproject: A standalone API layer that exposes identity management operations through RESTful endpointsUsersController): CRUD operations, claims, and role managementRolesController): Role CRUD and property managementMetaController): Discovery of available operations and configuration[EndpointName],[EndpointSummary],[ProducesResponseType],[Tags]) for automatic API documentation generation2. Separated UI Project
IdentityManager2UI project: Contains all Razor Pages and front-end assetsEmbeddedHtmlResult3. .NET 9.0 Target Framework
<TargetFramework>net9.0</TargetFramework>)Benefits
✅ Flexibility: Build custom UIs (React, Angular, Blazor, mobile apps) using the headless API
✅ Maintainability: Clear separation makes both API and UI easier to maintain and test
✅ Modern stack: .NET 9.0 provides performance improvements and latest framework features
✅ API-first approach: RESTful design enables integration with any HTTP client
✅ Backward compatibility: Existing UI functionality preserved in separate project
Migration Notes
For developers upgrading from previous versions:
IdentityManager2.ApisnamespaceAddIdentityManagerApi()andMapIdentityManagerApi()Testing
Hosts.IdentityServerAuthentication) updated and tested