No description
Find a file
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>"