MasLazu.AspNet.Authentication.Core.Consumer
1.0.0-preview.10
dotnet add package MasLazu.AspNet.Authentication.Core.Consumer --version 1.0.0-preview.10
NuGet\Install-Package MasLazu.AspNet.Authentication.Core.Consumer -Version 1.0.0-preview.10
<PackageReference Include="MasLazu.AspNet.Authentication.Core.Consumer" Version="1.0.0-preview.10" />
<PackageVersion Include="MasLazu.AspNet.Authentication.Core.Consumer" Version="1.0.0-preview.10" />
<PackageReference Include="MasLazu.AspNet.Authentication.Core.Consumer" />
paket add MasLazu.AspNet.Authentication.Core.Consumer --version 1.0.0-preview.10
#r "nuget: MasLazu.AspNet.Authentication.Core.Consumer, 1.0.0-preview.10"
#:package MasLazu.AspNet.Authentication.Core.Consumer@1.0.0-preview.10
#addin nuget:?package=MasLazu.AspNet.Authentication.Core.Consumer&version=1.0.0-preview.10&prerelease
#tool nuget:?package=MasLazu.AspNet.Authentication.Core.Consumer&version=1.0.0-preview.10&prerelease
MasLazu.AspNet.Authentication.Core.Consumer
This project contains the event consumers for the MasLazu ASP.NET Authentication Core library.
Overview
The MasLazu.AspNet.Authentication.Core.Consumer project provides:
- Event Consumers: MassTransit consumers for handling authentication-related events
- Event-Driven Processing: Asynchronous processing of verification and authentication events
- Extensions: Dependency injection and MassTransit registration extensions
Key Consumers
VerificationCompletedConsumer: HandlesVerificationCompletedEventto verify user emails upon successful verification
Key Components
ServiceCollectionExtensions: Extensions for registering consumers in DI and MassTransit
Project Configuration
- Target Framework: .NET 9.0
- Implicit Usings: Enabled
- Nullable Reference Types: Enabled
Dependencies
Package References:
MasLazu.AspNet.Verification.Abstraction- Verification event modelsMassTransit- Message bus for event handlingMicrosoft.Extensions.DependencyInjection- DI container
Project References:
MasLazu.AspNet.Authentication.Core.Abstraction- Service interfaces
Usage
Register the consumers in your application's DI container and MassTransit configuration:
// Register consumers in DI
services.AddAuthenticationCoreConsumers();
// Configure MassTransit
busConfigurator.AddAuthenticationCoreConsumers();
The consumers will automatically handle events published to the message bus.
Event Flow
- Verification service publishes
VerificationCompletedEvent VerificationCompletedConsumerreceives the event- If verification is successful, updates user email verification status
- User email is marked as verified in the database
🛠️ Development Guidelines
Naming Conventions
- Consumers: Suffix with Consumer (e.g., VerificationCompletedConsumer)
- Extensions: Suffix with Extensions (e.g., ServiceCollectionExtensions)
- Event Handlers: Follow MassTransit IConsumer<TEvent> pattern
Code Structure
src/MasLazu.AspNet.Authentication.Core.Consumer/
├── Consumers/ # MassTransit event consumers
├── Extensions/ # DI and MassTransit extensions
├── MasLazu.AspNet.Authentication.Core.Consumer.csproj
└── README.md
Best Practices
- Implement
IConsumer<TEvent>for event handling - Use dependency injection for service dependencies
- Handle exceptions appropriately in consumer logic
- Follow async/await patterns for database operations
- Include proper logging for event processing
🤝 Contributing
- New Consumers: Implement IConsumer<TEvent> for new event types
- Event Handling: Add business logic for processing events
- Registration: Update extensions to register new consumers
- Testing: Add integration tests for consumer behavior
- Error Handling: Implement retry and dead letter queue patterns
📄 License
Part of the MasLazu ASP.NET framework ecosystem.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net9.0
- MasLazu.AspNet.Authentication.Core.Abstraction (>= 1.0.0-preview.10)
- MasLazu.AspNet.Verification.Abstraction (>= 1.0.0-preview.6)
- MassTransit (>= 8.5.2)
- Microsoft.Extensions.DependencyInjection (>= 9.0.9)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0-preview.10 | 145 | 10/8/2025 |
| 1.0.0-preview.9 | 140 | 10/2/2025 |
| 1.0.0-preview.8 | 139 | 10/1/2025 |
| 1.0.0-preview.7 | 137 | 10/1/2025 |
| 1.0.0-preview.5 | 138 | 9/29/2025 |
| 1.0.0-preview.3 | 269 | 9/18/2025 |
See RELEASES.md for release notes.