Raycynix.Extensions.Security.Abstractions 3.0.0

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

Raycynix.Extensions.Security.Abstractions

Raycynix.Extensions.Security.Abstractions contains the transport-neutral contracts used by the Raycynix security and secrets packages.

What it contains

  • ISecurityContext
  • ISecretProvider
  • ISecretResolver
  • SecuritySubjectType
  • SecurityClaimTypes
  • shared authorization attributes such as RequirePermissionAttribute and RequireRoleAttribute

Purpose

This package allows other packages to depend on shared security, authorization, and secret-resolution contracts without depending on implementation packages.

The security model assumes:

  • request subjects are authenticated and known
  • supported subject types are User and Service
  • Roles are aggregates
  • Permissions are the canonical access checks

The authorization model exposes declarative attributes that can be reused by multiple pipelines, including messaging and ASP.NET Core:

  • RequireAuthenticatedSubjectAttribute
  • RequireSubjectTypeAttribute
  • RequirePermissionAttribute
  • RequireAnyPermissionAttribute
  • RequireAllPermissionsAttribute
  • RequireRoleAttribute
  • RequireAnyRoleAttribute
  • RequireAllRolesAttribute

Authorization attributes can be applied to classes or methods. Permission and role values are trimmed and validated when an attribute is created; empty requirement sets are rejected.

The secret model assumes:

  • applications read secrets through shared abstractions
  • a provider represents a single source
  • a resolver aggregates providers and returns the first available secret
  • built-in providers can target local env, GitHub Actions, and TeamCity-style injection

Permissions should use a stable resource.action format, for example users.read or orders.approve.

Logging

This package contains contracts, attributes, constants, records, and enums only. Runtime diagnostics belong to implementation packages, so this package does not add a logging dependency.

Usage

public sealed class UserProjection(ISecurityContext securityContext)
{
    public string? CurrentSubjectId => securityContext.IsAuthenticated
        ? securityContext.SubjectId
        : null;
}
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.
  • net10.0

    • No dependencies.

NuGet packages (5)

Showing the top 5 NuGet packages that depend on Raycynix.Extensions.Security.Abstractions:

Package Downloads
Raycynix.Extensions.Security

Core security services with typed SecurityOptions and JwtOptions, shared identity contexts, validated JWT settings, and DI-ready configuration snapshots.

Raycynix.Extensions.Messaging.Abstractions

Transport-agnostic messaging contracts, codecs, handlers, outbox abstractions, and direct communication primitives for Raycynix applications.

Raycynix.Extensions.Secrets

Validated secret resolution with typed SecretOptions, configurable provider precedence, IConfiguration integration, diagnostics, and CI/CD environment fallbacks.

Raycynix.Extensions.Messaging

Transport-agnostic messaging, dispatch, direct requests, standard .NET metrics instrumentation, scoped envelopes, and outbox/inbox reliability foundations.

Raycynix.Extensions.Observability.AspNetCore

ASP.NET Core observability composition with correlation propagation, standard OpenTelemetry request metrics, tracing, and explicit health endpoint mapping.

GitHub repositories

This package is not used by any popular GitHub repositories.

v3.0.0 validates authorization attributes, supports attributes on controller actions and methods, normalizes role and permission values, and rejects empty authorization requirements.