This document provides a comprehensive overview of the CoreIdent project structure, components, and their purposes. Use this index to quickly locate specific functionality and understand the organization of the codebase.
CoreIdent is a .NET 10 OpenID Connect and OAuth 2.0 server implementation focused on security, developer experience, and modern authentication patterns including passkeys and passwordless authentication.
CoreIdent/
├── src/ # Source code libraries
│ ├── CoreIdent.Core/ # Core library with interfaces, models, and services
│ ├── CoreIdent.Storage.EntityFrameworkCore/ # EF Core store implementations
│ ├── CoreIdent.Adapters.DelegatedUserStore/ # Adapter for existing user stores
│ ├── CoreIdent.Aspire/ # .NET Aspire integration
│ ├── CoreIdent.Cli/ # Command-line interface tool
│ ├── CoreIdent.OpenApi/ # OpenAPI/Swagger documentation
│ ├── CoreIdent.Passkeys/ # Passkey/WebAuthn support
│ ├── CoreIdent.Passkeys.AspNetIdentity/ # Passkey integration with ASP.NET Identity
│ ├── CoreIdent.Passwords.AspNetIdentity/ # Password integration with ASP.NET Identity
│ └── CoreIdent.Templates/ # dotnet new template pack
├── tests/ # Test projects
│ ├── CoreIdent.Core.Tests/ # Unit tests for core functionality
│ ├── CoreIdent.Integration.Tests/ # Integration tests
│ ├── CoreIdent.Testing/ # Shared test infrastructure
│ ├── CoreIdent.TestHost/ # Test server host
│ ├── CoreIdent.Cli.Tests/ # CLI tests
│ ├── CoreIdent.Templates.Tests/ # Template tests
│ └── CoreIdent.FSharp.Sample/ # F# sample tests
├── templates/ # Project templates
│ ├── coreident-api/ # Minimal API template
│ ├── coreident-api-fsharp/ # F# API template
│ └── coreident-server/ # Full server template with consent UI
├── samples/ # Sample applications
│ └── CoreIdent.FSharp.Sample/ # F# sample application
├── docs/ # Documentation
├── website/ # Project website
└── Configuration files # .sln, .gitignore, build props, etc.
Purpose: Core library containing all fundamental interfaces, models, services, and endpoints.
Key Components:
Configuration/- Options classes and validationCoreIdentOptions.cs- Main configuration optionsCoreIdentKeyOptions.cs- Signing key configurationPasswordlessOptions.cs- Passwordless authentication settings
Endpoints/- HTTP endpoint implementationsAuthEndpoints.cs- Authentication endpointsTokenEndpoints.cs- Token issuance and validationPasswordlessEndpoints.cs- Passwordless authenticationDiscoveryEndpoints.cs- OIDC discovery endpointsOAuthEndpoints.cs- OAuth 2.0 endpoints
Services/- Core business logic servicesITokenService.cs/JwtTokenService.cs- JWT token handlingISigningKeyProvider.cs- Asymmetric key managementIPasswordlessService.cs- Passwordless authentication logicICoreIdentMetrics.cs- OpenTelemetry metrics
Stores/- Data access interfaces and in-memory implementationsIUserStore.cs- User data accessIClientStore.cs- OAuth client managementIRefreshTokenStore.cs- Refresh token storageITokenRevocationStore.cs- Token revocation trackingIPasswordlessTokenStore.cs- Passwordless token storage
Models/- Domain models and DTOs- User, client, token models
- Request/response DTOs
Extensions/- Extension methods for DI and configurationServiceCollectionExtensions.cs- DI registrationEndpointRouteBuilderExtensions.cs- Endpoint mappingClaimsPrincipalExtensions.cs- Claims utilities (C# 14 extensions)
Purpose: Entity Framework Core implementations of core store interfaces.
Key Components:
- EF Core DbContext and entity configurations
- Database implementations of all store interfaces
- Migration support for SQL Server, PostgreSQL, SQLite
Purpose: Adapter pattern implementation for integrating with existing user stores.
Key Components:
DelegatedUserStore.cs- Delegates user operations to existing storesDelegatedPasswordHasher.cs- Password hashing integration- Configuration and validation for delegation scenarios
Purpose: .NET Aspire integration for cloud-native applications.
Key Components:
- Service defaults configuration
- Health checks integration
- Distributed application builder extensions
- Observability and telemetry integration
Purpose: Command-line interface tool for CoreIdent management.
Key Components:
CliApp.cs- CLI application entry pointPemKeyGenerator.cs- Key generation utilitiesCsprojEditor.cs- Project file manipulation- Commands for key management, configuration, and development
Purpose: OpenAPI/Swagger documentation generation for endpoints.
Key Components:
- OpenAPI document generation
- Endpoint documentation
- Schema definitions for API contracts
Purpose: Passkey (WebAuthn) authentication support.
Key Components:
- Passkey registration and authentication flows
- WebAuthn API integration
- Challenge generation and validation
- Passkey credential management
Purpose: Passkey integration with ASP.NET Identity.
Key Components:
- ASP.NET Identity user store integration
- Passkey credential storage for Identity users
- Seamless integration with existing Identity applications
Purpose: Password authentication integration with ASP.NET Identity.
Key Components:
- Password hashing and validation
- Identity password policy integration
- Migration support for existing Identity applications
Purpose: dotnet new template pack for project scaffolding.
Key Components:
- Template configuration and packaging
- Template parameter processing
- Integration with dotnet CLI
Purpose: Unit tests for core library functionality.
Key Components:
- Service layer unit tests
- Model validation tests
- Extension method tests
- Configuration validation tests
Purpose: End-to-end integration tests.
Key Components:
- HTTP endpoint integration tests
- OAuth/OIDC flow tests
- Database integration tests
- Authentication flow testing
Purpose: Shared test infrastructure and utilities.
Key Components:
- Test fixtures and base classes
- Fluent builders for test data
- Assertion extensions
- Mock utilities and helpers
Purpose: Test server host for integration testing.
Key Components:
- Minimal test application setup
- Test configuration
- Endpoint mapping for tests
Purpose: CLI tool testing.
Key Components:
- Command-line interface tests
- Key generation tests
- Project manipulation tests
Purpose: Template validation and testing.
Key Components:
- Template generation tests
- Parameter validation
- Output verification
Purpose: Minimal API project template.
Key Components:
- Basic CoreIdent API setup
- Minimal configuration
- Essential endpoints only
Purpose: F# minimal API project template.
Key Components:
- F# language implementation
- Functional programming patterns
- F#-specific configuration
Purpose: Full-featured server template with UI.
Key Components:
- Complete CoreIdent server setup
- Consent UI implementation
- Administrative interfaces
- Full configuration examples
Project_Overview.md- High-level project vision and architectureTechnical_Plan.md- Detailed technical specifications and implementation guidanceDEVPLAN.md- Task-level implementation checklist and progress trackingDeveloper_Guide.md- Integration and usage guide for developersREADME_Detailed.md- Comprehensive feature documentationPasskeys.md- Passkey authentication setup and configurationAspire_Integration.md- .NET Aspire integration guideCLI_Reference.md- Command-line tool referenceFSharp_Guide.md- F# specific guidance and examples
CoreIdent.sln- Solution fileDirectory.Build.props- MSBuild properties for all projectsDirectory.Build.targets- MSBuild targets for all projects.gitignore- Git ignore patternsREADME.md- Project READMELICENSE- License fileCHANGELOG.md- Version historyCONTRIBUTING.md- Contribution guidelinesMIGRATION.md- Migration guide for version upgrades
Purpose: Project website and documentation site.
Key Components:
index.html- Main landing pagefeatures.html- Feature overviewstyle.css- Website stylingassets/- Static assets (logos, images)
All major services implement interfaces for testability and extensibility:
- Store interfaces for data access
- Service interfaces for business logic
- Configuration interfaces for options
Heavy use of .NET DI container with:
TryAddmethods for override capability- Options pattern for configuration
- Service lifetime management
- Asymmetric key support (RS256/ES256) for production
- Token revocation and introspection (RFC 7009/7662)
- Passkey/WebAuthn support
- Passwordless authentication options
- C# 14 extension members for ClaimsPrincipal
- Minimal APIs for endpoint implementation
- Built-in OpenTelemetry metrics
- Enhanced passkey support
- Start with
docs/Project_Overview.mdfor high-level understanding - Review
docs/Technical_Plan.mdfor detailed specifications - Use
docs/DEVPLAN.mdto track implementation progress - Follow
CLAUDE.mdfor development guidelines and standards
- Unit tests for all services and utilities
- Integration tests for HTTP endpoints
- Shared test infrastructure via
CoreIdent.Testing - Coverage requirements (>= 90% for CoreIdent.Core)
- .NET 10 target framework
- MSBuild-based build system
- Package management via NuGet
- Container support via .NET Aspire
- Add authentication: Use
src/CoreIdent.Core/Extensions/ServiceCollectionExtensions.cs - Configure endpoints: Use
src/CoreIdent.Core/Extensions/EndpointRouteBuilderExtensions.cs - Add storage: Implement store interfaces or use EF Core implementation
- Add metrics: Use
src/CoreIdent.Core/Services/ICoreIdentMetrics.cs - CLI operations: Use
src/CoreIdent.Cli/tools
src/CoreIdent.Core/Configuration/CoreIdentOptions.cs- Main configurationsrc/CoreIdent.Core/Services/JwtTokenService.cs- Token handlingsrc/CoreIdent.Core/Endpoints/- All HTTP endpointsdocs/DEVPLAN.md- Implementation status and roadmap
This index should help you quickly locate the components you need for development, testing, or integration with CoreIdent.