Info
Version: | 1.1.2 |
Author(s): | Nicolas Grandchamp |
Last Update: | Friday, February 2, 2018 |
.NET Fiddle: | Create the first Fiddle |
Project Url: | https://github.com/grandchamp/AuthAPI |
NuGet Url: | https://www.nuget.org/packages/AuthAPI.Core |
Install
Install-Package AuthAPI.Core
dotnet add package AuthAPI.Core
paket add AuthAPI.Core
AuthAPI.Core Download (Unzip the "nupkg" after downloading)
Dependencies
- Microsoft.AspNetCore.Mvc.Core(>= 2.0.2)
- Microsoft.Extensions.Caching.Memory(>= 2.0.0)
- Microsoft.Extensions.DependencyInjection(>= 2.0.0)
- Microsoft.Extensions.Options(>= 2.0.0)
Contains the base AuthAPI stuff and a HttpClientHandler to integrate easily with HttpClient.
This API auth works by generating a hash consisting of: client id, identifier (random GUID), request count (to prevent replay attacks), username, password (could be anything, there's no validation of password here), HTTP method, base64 of the body (even if it's a empty one) and the request URI. All of this are packed into a string and hashed with HMAC'd with SHA256.