Lightweight ASP.NET Core authentication library with API key and basic authentication support. Provides simple, configurable filters for securing APIs without the complexity of full OAuth/OIDC implementations.
License
—
Deps
0
Install Size
—
Vulns
✓ 0
Published
Dec 10, 2025
$ dotnet add package SolTechnology.Core.AuthenticationThe SolTechnology.Core.Authentication library provides minimum basic API Key Authentication functionality. It handles needed services registration and configuration.
For installing the library, reference SolTechnology.Core.Authentication nuget package and invoke AddAuthenticationAndBuildFilter(); service collection extension method:
var authenticationFiler = builder.Services.AddAuthenticationAndBuildFilter();
"Configuration": {
"Authentication": {
"Key": "SecureKey"
}
}
var authenticationConfiguration = new AuthenticationConfiguration
{
Key = "SecureKey"
};
services.AddAuthenticationAndBuildFilter(authenticationConfiguration);
builder.Services.AddControllers(opts => opts.Filters.Add(authenticationFiler));
app.UseAuthorization();
app.UseAuthentication();
For example:
"X-Auth": "SolTechnologyAuthentication U2VjdXJlS2V5"