Synergy.Auth
1.0.3
dotnet add package Synergy.Auth --version 1.0.3
NuGet\Install-Package Synergy.Auth -Version 1.0.3
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Synergy.Auth" Version="1.0.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Synergy.Auth" Version="1.0.3" />
<PackageReference Include="Synergy.Auth" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Synergy.Auth --version 1.0.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Synergy.Auth, 1.0.3"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Synergy.Auth@1.0.3
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Synergy.Auth&version=1.0.3
#tool nuget:?package=Synergy.Auth&version=1.0.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Synergy.Auth 1.0.1 – Quick Integration Guide
Use these steps in any consuming service (e.g., Admin.API, DMS_API) to wire Synergy.Auth with minimal Program.cs edits.
1) Install package
dotnet add package Synergy.Auth --version 1.0.1
2) Add a single using
using Synergy.Auth.Infrastructure.Configuration;
3) Program.cs changes (minimal path)
Place these lines in your existing setup:
- After
var builder = WebApplication.CreateBuilder(args);keep your configuration precedence block if you use one (optional). - Services:
builder.Services.AddSynergyAuth(builder.Configuration); - MediatR: inside
AddMediatR⇒cfg.AddSynergyAuthHandlers(); - Marten: inside
AddMartenoptions ⇒options.ConfigureSynergyAuth(builder.Configuration); - MassTransit (Kafka rider):
- In rider:
rider.AddSynergyAuthKafka(); - In
rider.UsingKafka:k.ConfigureSynergyAuthTopics(context);
- In rider:
4) appsettings.json requirements
- Keycloak (required if auth is enabled):
Keycloak: BaseUrl,Realm,ClientId
- Kafka (optional):
Kafka: BootstrapServers - Marten schema (optional):
Marten:Schema:Auth(defaults toauth)
5) What this replaces
- No manual registration needed for:
- Synergy.Auth MediatR handlers
- Marten events, projections, read-model schemas
- Repositories
- Keycloak auth, authorization policy
- IHttpContextAccessor + ICurrentUserService
- MassTransit consumers, producers, Kafka topics
6) If you prefer manual wiring (not recommended)
- MediatR: register
AssemblyReferencehandlers. - Marten: call
DomainEventRegistry.RegisterEvents,InfrastructureRegistry.RegisterProjections, and set read-model schemas (omitTeamDetails—it doesn’t exist in Synergy.Auth). - Services: register Keycloak auth, authorization, IHttpContextAccessor, ICurrentUserService, repositories.
- MassTransit: register Synergy.Auth consumers, producers, topics.
That’s it—drop in the using plus the five minimal calls and you’re done.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- FluentValidation.AspNetCore (>= 11.3.0)
- MediatR (>= 12.1.1)
- Microsoft.AspNetCore.OpenApi (>= 8.0.0)
- Serilog.AspNetCore (>= 8.0.0)
- Swashbuckle.AspNetCore (>= 6.5.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.