DKNet.EfCore.DataAuthorization 9.0.7

There is a newer version of this package available.
See the version list below for details.
dotnet add package DKNet.EfCore.DataAuthorization --version 9.0.7
                    
NuGet\Install-Package DKNet.EfCore.DataAuthorization -Version 9.0.7
                    
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="DKNet.EfCore.DataAuthorization" Version="9.0.7" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DKNet.EfCore.DataAuthorization" Version="9.0.7" />
                    
Directory.Packages.props
<PackageReference Include="DKNet.EfCore.DataAuthorization" />
                    
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 DKNet.EfCore.DataAuthorization --version 9.0.7
                    
#r "nuget: DKNet.EfCore.DataAuthorization, 9.0.7"
                    
#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 DKNet.EfCore.DataAuthorization@9.0.7
                    
#: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=DKNet.EfCore.DataAuthorization&version=9.0.7
                    
Install as a Cake Addin
#tool nuget:?package=DKNet.EfCore.DataAuthorization&version=9.0.7
                    
Install as a Cake Tool

DKNet.WfCore.DataAuthorization

Introduction

DKNet WfCore Data Authorization is a module designed to manage data access control within workflow applications, ensuring that users only interact with authorized data.

Features

  • Role-Based Access Control (RBAC): Define roles and permissions to control data access.
  • Integration with DKNet WfCore: Seamless integration with the broader DKNet WfCore framework.
  • Fine-Grained Authorization: Granular control over data operations.
  • Auditing/Logging: Track authorization events for compliance and debugging.
  • Customizable Policies: Define custom rules based on specific requirements.

Getting Started

Prerequisites

  • .NET Core 3.1 or later

Installation

Install the package using NuGet Package Manager:

Install-Package DKNet.WfCore.DataAuthorization -Version x.x.x

Or via dotnet CLI:

dotnet add package DKNet.WfCore.DataAuthorization --version x.x.x

Configuration

Modify appsettings.json to integrate authorization services:

{
  "DataAuthorization": {
    "DefaultRole": "guest",
    "Roles": {
      "admin": {
        "AllowedResources": ["*"]
      },
      "user": {
        "AllowedResources": ["api/*/read"]
      }
    }
  }
}

Usage

Inject IDataAuthorizationService into your controllers:

public class UserController : ControllerBase
{
    private readonly IDataAuthorizationService _authorizationService;

    public UserController(IDataAuthorizationService authorizationService)
    {
        _authorizationService = authorizationService;
    }

    [Authorize]
    public IActionResult GetUserData()
    {
        // Use _authorizationService to check permissions
        return Ok();
    }
}

Advanced Configuration

For custom policies, extend IDataAuthorizationPolicy and register them in your DI container:

public class CustomDataPolicy : IDataAuthorizationPolicy
{
    public bool IsAuthorized(User user, Operation operation)
    {
        // Implement custom logic here
        return true;
    }
}

Troubleshooting

Common issues include missing dependencies, misconfigured policies, and authorization failures. Visit our FAQ for solutions.

Conclusion

We welcome your feedback and contributions to improve DKNet.WfCore.DataAuthorization. Join our community on GitHub or Discord for support and updates.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
9.0.38 11 9/24/2025
9.0.37 32 9/23/2025
9.0.36 56 9/23/2025
9.0.35 34 9/23/2025
9.0.34 45 9/23/2025
9.0.33 70 9/21/2025
9.0.32 64 9/21/2025
9.0.31 240 9/19/2025
9.0.30 244 9/18/2025
9.0.29 239 9/18/2025
9.0.28 264 9/17/2025
9.0.27 256 9/17/2025
9.0.26 258 9/16/2025
9.0.25 214 9/15/2025
9.0.24 200 9/15/2025
9.0.23 110 9/6/2025
9.0.22 160 9/3/2025
9.0.21 131 9/1/2025
9.0.20 155 7/15/2025
9.0.19 150 7/14/2025
9.0.18 154 7/14/2025
9.0.17 148 7/14/2025
9.0.16 121 7/11/2025
9.0.15 123 7/11/2025
9.0.14 131 7/11/2025
9.0.13 139 7/11/2025
9.0.12 153 7/8/2025
9.0.11 143 7/8/2025
9.0.10 145 7/7/2025
9.0.9 141 7/2/2025
9.0.8 154 7/2/2025
9.0.7 156 7/1/2025
9.0.6 146 6/30/2025
9.0.5 145 6/24/2025
9.0.4 158 6/24/2025
9.0.3 139 6/23/2025
9.0.2 152 6/23/2025
9.0.1 147 6/23/2025