Sparkdo.Authorization.Abstractions
1.0.0-preview.5
.NET 10.0
This package targets .NET 10.0. The package is compatible with this framework or higher.
.NET Standard 2.0
This package targets .NET Standard 2.0. The package is compatible with this framework or higher.
This is a prerelease version of Sparkdo.Authorization.Abstractions.
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Sparkdo.Authorization.Abstractions --version 1.0.0-preview.5
NuGet\Install-Package Sparkdo.Authorization.Abstractions -Version 1.0.0-preview.5
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="Sparkdo.Authorization.Abstractions" Version="1.0.0-preview.5" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Sparkdo.Authorization.Abstractions" Version="1.0.0-preview.5" />
<PackageReference Include="Sparkdo.Authorization.Abstractions" />
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 Sparkdo.Authorization.Abstractions --version 1.0.0-preview.5
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Sparkdo.Authorization.Abstractions, 1.0.0-preview.5"
#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 Sparkdo.Authorization.Abstractions@1.0.0-preview.5
#: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=Sparkdo.Authorization.Abstractions&version=1.0.0-preview.5&prerelease
#tool nuget:?package=Sparkdo.Authorization.Abstractions&version=1.0.0-preview.5&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Sparkdo.Authorization.Abstractions
Sparkdo 授权抽象库,提供授权功能的核心接口和抽象类定义。
功能特性
- 授权服务抽象:定义授权服务的核心接口
- 方法调用授权抽象:定义方法级别授权的核心接口
- 授权策略提供者抽象:定义授权策略提供者的核心接口
- 权限要求和处理程序:定义权限检查的核心组件
- 与 ASP.NET Core 授权系统无缝集成
- 支持多租户场景下的授权控制
- 为 Sparkdo.Authorization 提供基础抽象
核心组件
授权服务接口
ISparkdoAuthorizationService: Sparkdo 授权服务接口,继承自IAuthorizationServiceIMethodInvocationAuthorizationService: 方法调用授权服务接口
授权策略提供者
ISparkdoAuthorizationPolicyProvider: Sparkdo 授权策略提供者接口,继承自IAuthorizationPolicyProvider
权限要求和处理程序
PermissionRequirement: 权限要求类PermissionRequirementHandler: 权限要求处理程序PermissionsRequirement: 多权限要求类PermissionsRequirementHandler: 多权限要求处理程序
上下文和模型
MethodInvocationAuthorizationContext: 方法调用授权上下文AlwaysAllowAuthorizationService: 总是允许的授权服务实现(用于测试或开发环境)
安装
<PackageReference Include="Sparkdo.Authorization.Abstractions" Version="x.x.x" />
使用场景
该库主要作为 Sparkdo 授权系统的抽象层,为具体实现提供接口定义。通常不需要直接引用此包,而是通过引用 Sparkdo.Authorization 包来使用完整的授权功能。
在以下场景中可能需要直接引用此包:
- 实现自定义的授权服务
- 创建自定义的授权策略提供者
- 扩展方法调用授权功能
- 构建基于 Sparkdo 授权系统的第三方库
扩展性
所有公共接口都设计为可扩展的,开发者可以通过以下方式扩展:
- 实现
ISparkdoAuthorizationService接口创建自定义授权服务 - 实现
IMethodInvocationAuthorizationService接口创建自定义方法调用授权服务 - 实现
ISparkdoAuthorizationPolicyProvider接口创建自定义策略提供者 - 继承
PermissionRequirementHandler或PermissionsRequirementHandler创建自定义权限处理程序
所有公共接口和类都添加了详细的 XML 文档注释,便于开发者理解和使用。
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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 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. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.0
- JetBrains.Annotations (>= 2025.2.2)
- Microsoft.AspNetCore.Authorization (>= 10.0.0-rc.2.25502.107)
- Microsoft.Bcl.AsyncInterfaces (>= 10.0.0-rc.2.25502.107)
- Microsoft.Extensions.Configuration (>= 10.0.0-rc.2.25502.107)
- Microsoft.Extensions.Configuration.CommandLine (>= 10.0.0-rc.2.25502.107)
- Microsoft.Extensions.Configuration.EnvironmentVariables (>= 10.0.0-rc.2.25502.107)
- Microsoft.Extensions.Configuration.FileExtensions (>= 10.0.0-rc.2.25502.107)
- Microsoft.Extensions.Configuration.Json (>= 10.0.0-rc.2.25502.107)
- Microsoft.Extensions.Configuration.UserSecrets (>= 10.0.0-rc.2.25502.107)
- Microsoft.Extensions.DependencyInjection (>= 10.0.0-rc.2.25502.107)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.0-rc.2.25502.107)
- Microsoft.Extensions.DependencyModel (>= 10.0.0-rc.2.25502.107)
- Microsoft.Extensions.Diagnostics (>= 10.0.0-rc.2.25502.107)
- Microsoft.Extensions.FileProviders.Composite (>= 10.0.0-rc.2.25502.107)
- Microsoft.Extensions.FileProviders.Embedded (>= 10.0.0-rc.2.25502.107)
- Microsoft.Extensions.FileProviders.Physical (>= 10.0.0-rc.2.25502.107)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.0-rc.2.25502.107)
- Microsoft.Extensions.Localization (>= 10.0.0-rc.2.25502.107)
- Microsoft.Extensions.Logging (>= 10.0.0-rc.2.25502.107)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.0-rc.2.25502.107)
- Microsoft.Extensions.Options (>= 10.0.0-rc.2.25502.107)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.0-rc.2.25502.107)
- Microsoft.Extensions.Options.DataAnnotations (>= 10.0.0-rc.2.25502.107)
- Nito.AsyncEx.Context (>= 5.1.2)
- Sparkdo.MultiTenancy.Abstractions (>= 1.0.0-preview.5)
- Sparkdo.StateChecking (>= 1.0.0-preview.5)
- System.Linq.Dynamic.Core (>= 1.6.8)
- System.Runtime.Loader (>= 4.3.0)
- System.Text.Json (>= 10.0.0-rc.2.25502.107)
-
net10.0
- JetBrains.Annotations (>= 2025.2.2)
- Microsoft.AspNetCore.Authorization (>= 10.0.0-rc.2.25502.107)
- Microsoft.Extensions.Configuration (>= 10.0.0-rc.2.25502.107)
- Microsoft.Extensions.Configuration.CommandLine (>= 10.0.0-rc.2.25502.107)
- Microsoft.Extensions.Configuration.EnvironmentVariables (>= 10.0.0-rc.2.25502.107)
- Microsoft.Extensions.Configuration.FileExtensions (>= 10.0.0-rc.2.25502.107)
- Microsoft.Extensions.Configuration.Json (>= 10.0.0-rc.2.25502.107)
- Microsoft.Extensions.Configuration.UserSecrets (>= 10.0.0-rc.2.25502.107)
- Microsoft.Extensions.DependencyInjection (>= 10.0.0-rc.2.25502.107)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.0-rc.2.25502.107)
- Microsoft.Extensions.DependencyModel (>= 10.0.0-rc.2.25502.107)
- Microsoft.Extensions.Diagnostics (>= 10.0.0-rc.2.25502.107)
- Microsoft.Extensions.FileProviders.Composite (>= 10.0.0-rc.2.25502.107)
- Microsoft.Extensions.FileProviders.Embedded (>= 10.0.0-rc.2.25502.107)
- Microsoft.Extensions.FileProviders.Physical (>= 10.0.0-rc.2.25502.107)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.0-rc.2.25502.107)
- Microsoft.Extensions.Localization (>= 10.0.0-rc.2.25502.107)
- Microsoft.Extensions.Logging (>= 10.0.0-rc.2.25502.107)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.0-rc.2.25502.107)
- Microsoft.Extensions.Options (>= 10.0.0-rc.2.25502.107)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.0-rc.2.25502.107)
- Microsoft.Extensions.Options.DataAnnotations (>= 10.0.0-rc.2.25502.107)
- Nito.AsyncEx.Context (>= 5.1.2)
- Sparkdo.MultiTenancy.Abstractions (>= 1.0.0-preview.5)
- Sparkdo.StateChecking (>= 1.0.0-preview.5)
- System.Linq.Dynamic.Core (>= 1.6.8)
NuGet packages (7)
Showing the top 5 NuGet packages that depend on Sparkdo.Authorization.Abstractions:
| Package | Downloads |
|---|---|
|
Sparkdo.Authorization
Sparkdo 授权库,提供基于策略和权限的授权功能实现 |
|
|
Sparkdo.GlobalFeatures
Sparkdo 全局特性库,提供应用程序级别的特性开关管理和模块化特性控制功能 |
|
|
Sparkdo.Hangfire
Sparkdo Hangfire 集成库,提供后台作业调度功能实现 |
|
|
Sparkdo.SettingManagement.Application.Contracts
Sparkdo 设置管理应用服务契约库,提供设置管理功能的应用服务接口定义和数据传输对象 |
|
|
Sparkdo.TenantManagement.Application.Contracts
library for the Sparkdo framework |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.2-preview.1 | 145 | 12/4/2025 |
| 1.0.1 | 818 | 11/27/2025 |
| 1.0.0 | 813 | 11/25/2025 |
| 1.0.0-preview.5 | 101 | 10/24/2025 |