No description
This repository has been archived on 2026-07-13. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
  • C# 55.3%
  • PowerShell 24.3%
  • Shell 18.7%
  • Batchfile 1.7%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2023-02-18 13:23:23 +00:00
.nuke Update all the things 2023-02-18 13:23:23 +00:00
build Update all the things 2023-02-18 13:23:23 +00:00
src Update all the things 2023-02-18 13:23:23 +00:00
.drone.yml Update all the things 2023-02-18 13:23:23 +00:00
.editorconfig Extract from Blog API 2021-05-08 21:54:28 +01:00
.gitignore Update all the things 2023-02-18 13:23:23 +00:00
build.cmd Extract from Blog API 2021-05-08 21:54:28 +01:00
build.ps1 Update all the things 2023-02-18 13:23:23 +00:00
build.sh Update all the things 2023-02-18 13:23:23 +00:00
Readme.md Update 'Readme.md' 2021-05-09 07:34:11 +01:00

Build Status

ASP.NET Core API Key authorisation handler

Used to validate API keys with the Auth API.

Usage

In Startup.cs add the following to your ConfigureServices method:

services.AddApiKeyAuthentication(Configuration["authEndpoint"], Configuration["authApiKey"]);

Then ensure that you have the following in your Configure method in the order given:

app.UseAuthentication();
app.UseAuthorization();

In your appsettings.json add these entries:

"authEndpoint": "<AuthEndpoint>",
"authApiKey": "<AuthApiKey>"