cCoder.Security 2026.7.30.2059

dotnet add package cCoder.Security --version 2026.7.30.2059
                    
NuGet\Install-Package cCoder.Security -Version 2026.7.30.2059
                    
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="cCoder.Security" Version="2026.7.30.2059" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="cCoder.Security" Version="2026.7.30.2059" />
                    
Directory.Packages.props
<PackageReference Include="cCoder.Security" />
                    
Project file
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 cCoder.Security --version 2026.7.30.2059
                    
#r "nuget: cCoder.Security, 2026.7.30.2059"
                    
#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 cCoder.Security@2026.7.30.2059
                    
#: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=cCoder.Security&version=2026.7.30.2059
                    
Install as a Cake Addin
#tool nuget:?package=cCoder.Security&version=2026.7.30.2059
                    
Install as a Cake Tool

cCoder.Security

cCoder.Security.Data exposes its supporting persistence services through services.AddSecurityData(configuration.Security). The same strongly typed SecurityConfiguration instance is passed onward to cCoder.Security; no flat ConnectionStrings compatibility configuration is required.

cCoder.Security owns the SSO security boundary for the cCoder platform. It manages tenants, SSO users, registrations, invitations, password reset tokens, login sessions, and the Security account lifecycle events consumed by downstream domains.

Local Configuration

Configuration binds directly into SecurityConfiguration. Leave secrets empty in appsettings and define Security__ConnectionString and Security__DecryptionKey as user-level or machine-level environment variables. Restart Visual Studio, select the Web and HostedServices startup projects, and press F5. No configuration conversion step is required.

Repository Layout

  • src/cCoder.Security Main NuGet package, API controllers, service collection extensions, account orchestration, and event publication.
  • src/cCoder.Security.Data SQL Server EF Core persistence, models, context factories, migrations, and typed Security event models.
  • src/Apps/Security.Web Public API host for account, tenant, and SSO endpoints.
  • src/Apps/Security.HostedServices Hosted-services app for background/event processing.
  • src/cCoder.Security.Tests Unit tests for Security services and managers.
  • src/Apps/Security.Web.AcceptanceTests HTTP acceptance tests for the public web app.
  • src/Apps/Security.HostedServices.AcceptanceTests Startup and health acceptance tests for the hosted-services app.

App Responsibilities

Security.Web hosts the public API surface only. It exposes account, authentication, registration, and invitation routes under Api/Account, SSO user APIs, tenant APIs, and /Health.

Security.HostedServices is the background/event host. It registers Security event handlers and exposes /Health for runner and deployment health checks.

Consumers should use the shared service collection extensions:

services.AddSecurityWeb(configuration);
services.AddSecurityHostedServices(configuration);

Account Lifecycle

Security owns the following account flows:

  • Login and logout.
  • Direct registration and registration confirmation.
  • Forgot password and confirm forgot password.
  • Invitation, resend invitation, and accept invitation.

Invitation creates an SSO user without requiring a password. The invited user activates the account by accepting the invite token and setting a password.

External consumers should use the Api/Account HTTP endpoints for these account lifecycle operations. ITokenManager is reserved for privileged internal business cases, such as issuing a WorkflowExecution token for a known SSO user while executing a trusted workflow.

Event Contract

Security publishes typed account lifecycle events after Security-owned state changes complete. Event payloads use SecurityAccountEvent and include:

  • Kind
  • User
  • Tenant
  • RequestDomain
  • Token
  • Culture

Security does not include an app id in account events. Consumers resolve the app from RequestDomain.

Published event names:

  • security_account_registration_created
  • security_account_registration_confirmed
  • security_account_invitation_created
  • security_account_invitation_accepted
  • security_account_password_reset_requested

Downstream ownership:

  • cCoder.AppSecurity creates or updates app-local users and role links from Security account events.
  • cCoder.Core queues app-template emails from Security account events.

Configuration

Set SQL Server connection strings through appsettings or environment variables:

Required secret environment variables:

- `Security__ConnectionString`
- `Security__DecryptionKey`

Leave their matching `appsettings.json` values empty, define them as user- or
machine-level environment variables, restart Visual Studio, and run with F5.

Acceptance tests also read:

$env:Security__ConnectionString = "Data Source=.;Initial Catalog=dev-Members;MultipleActiveResultSets=True;Trusted_Connection=True;Trust Server Certificate=true;Encrypt=True"

SQLite support has been retired; SQL Server is the only supported EF provider.

Build And Test

dotnet restore src\cCoder.Security.slnx
dotnet build src\cCoder.Security.slnx --no-restore
dotnet test src\cCoder.Security.slnx --no-restore --no-build

Before submitting changes, run both apps locally and confirm there are no startup errors:

dotnet run --project src\Apps\Security.Web\Security.Web.csproj
dotnet run --project src\Apps\Security.HostedServices\Security.HostedServices.csproj

Package

This repository publishes:

  • cCoder.Security
  • cCoder.Security.Data

License

This repository is licensed under The Standard Software License Version 1.0. See LICENSE.txt for details.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on cCoder.Security:

Package Downloads
cCoder.Core

cCoder.Core

cCoder.AppSecurity

cCoder.AppSecurity

cCoder.Workflow

cCoder.Workflow

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2026.7.30.2059 45 7/30/2026
2026.7.30.1935 40 7/30/2026
2026.7.30.1718 40 7/30/2026
2026.7.30.1536 37 7/30/2026
2026.7.29.2358 69 7/29/2026
2026.7.29.1010 45 7/29/2026
2026.7.29.319 65 7/29/2026
2026.7.29.155 59 7/29/2026
2026.7.28.1631 56 7/28/2026
2026.7.27.1359 84 7/27/2026
2026.7.27.1358 91 7/27/2026
2026.7.27.1119 84 7/27/2026
2026.7.26.1336 265 7/26/2026
2026.7.25.2005 144 7/25/2026
2026.7.23.2120 434 7/23/2026
2026.7.22.1510 93 7/22/2026
2026.7.22.1145 119 7/22/2026
2026.7.22.814 149 7/22/2026
2026.7.22.813 92 7/22/2026
2026.7.7.1439 275 7/7/2026
Loading failed