No description
- C# 55.3%
- PowerShell 24.3%
- Shell 18.7%
- Batchfile 1.7%
| .nuke | ||
| build | ||
| src | ||
| .drone.yml | ||
| .editorconfig | ||
| .gitignore | ||
| build.cmd | ||
| build.ps1 | ||
| build.sh | ||
| Readme.md | ||
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>"