Enbrea.ApiKey 0.3.1

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

NuGet Gallery GitHub

Enbrea.ApiKey

A .NET library for supporting API key�based access control in ASP.NET Core applications.

  • Supports .NET 10, .NET 9 and .NET 8
  • Integrates easily into ASP.NET Core using services.AddApiKeyValidation(...).
  • Provides attribute-based protection using [ApiKey(typeof(MyApiKeyPolicyProvider))] to secure controllers or actions.
  • Offers configurable key extraction through Authorization headers (e.g. ApiKey), custom headers (e.g. X-API-KEY), and query parameters.
  • Supports customizable policies that define allowed API keys, IP ranges (CIDR), and local-only access.
  • Includes built-in error handling that returns proper HTTP status codes or RFC 9457 Problem Details responses.
  • Uses an extensible design so you can override or replace extractors, policies, and error factories through dependency injection.

Installation

dotnet add package Enbrea.ApiKey

Getting started

See GitHub wiki.

Can I help?

Yes, that would be much appreciated. The best way to help is to post a response via the Issue Tracker and/or submit a Pull Request.

Product 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 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 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.
  • net8.0

    • No dependencies.
  • net9.0

    • No dependencies.

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
0.3.1 142 5/27/2026
0.3.0 114 5/7/2026
0.2.0 254 12/5/2025
0.1.0 246 10/21/2025