EngineBay.Authentication
2.2.2
See the version list below for details.
dotnet add package EngineBay.Authentication --version 2.2.2
NuGet\Install-Package EngineBay.Authentication -Version 2.2.2
<PackageReference Include="EngineBay.Authentication" Version="2.2.2" />
paket add EngineBay.Authentication --version 2.2.2
#r "nuget: EngineBay.Authentication, 2.2.2"
// Install EngineBay.Authentication as a Cake Addin #addin nuget:?package=EngineBay.Authentication&version=2.2.2 // Install EngineBay.Authentication as a Cake Tool #tool nuget:?package=EngineBay.Authentication&version=2.2.2
EngineBay.Authentication
Authentication module for EngineBay published to EngineBay.Authentication on NuGet.
About
Learn about Authentication and Authorization.
This module provides middleware and services for both authentication and authorization. The behaviour of the authentication depends heavily on your configuration options. The module can be configured to use JWT auth, Basic auth, and no auth. JWT is recommended. The latter two should only be used during local testing - not in a production environment.
Simple endpoints to register a user or get the current user are also provided.
This module also provides implementations of ICurrentIdentity, which can be used by modules such as EngineBay.Auditing, to get information about the current user from the HttpContext.
Not implemented yet: With the authorization middleware, you can specify authorization policies on endpoints to limit access to users with the appropriate permissions.
Usage
When this module is registered and configured, all endpoints will only allow authenticated users by default. To allow unauthenticated users to access an endpoint, you can use the .AllowAnonymous()
method on the route builder. For an example, see AuthenticationModule.
Not implemented yet: To restrict access to endpoints to users with specific permissions, you can use .RequireAuthorization("Policy.Name")
on the route builder. For an example, see AuditEntryEndpoint.
Registration
This module cannot run on its own. You will need to register it in your application to use its functionality. See the Demo API registration guide.
Since this module uses HttpContextAccessor in custom components, you will need to register it on the service collection for dependency injection. This can be done with the line builder.Services.AddHttpContextAccessor();
, as seen here.
Environment Variables
See the Documentation Portal.
Dependencies
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net8.0
- BCrypt.Net-Next (>= 4.0.3)
- EngineBay.Core (>= 10.0.0)
- EngineBay.Persistence (>= 7.0.0)
- FluentValidation (>= 11.9.0)
- Microsoft.AspNetCore.Authentication.JwtBearer (>= 8.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
2.4.0 | 147 | 2/13/2024 |
2.3.0 | 145 | 2/12/2024 |
2.2.5 | 137 | 1/30/2024 |
2.2.4 | 142 | 1/18/2024 |
2.2.3 | 131 | 1/16/2024 |
2.2.2 | 142 | 1/10/2024 |
2.2.1 | 186 | 12/20/2023 |
2.2.0 | 231 | 12/7/2023 |
2.1.3 | 132 | 12/7/2023 |
2.1.2 | 135 | 12/7/2023 |
2.1.1 | 127 | 12/4/2023 |
2.1.0 | 104 | 11/30/2023 |
2.0.1 | 214 | 11/29/2023 |
2.0.0 | 194 | 11/23/2023 |
1.1.1 | 119 | 11/23/2023 |
1.1.0 | 266 | 11/15/2023 |
1.0.5 | 104 | 11/8/2023 |
1.0.4 | 397 | 11/3/2023 |
1.0.3 | 199 | 11/1/2023 |
1.0.2 | 335 | 10/26/2023 |
1.0.1 | 146 | 10/10/2023 |
1.0.0 | 597 | 9/28/2023 |
0.11.17 | 156 | 9/26/2023 |
0.11.16 | 176 | 9/24/2023 |
0.11.15 | 137 | 9/24/2023 |
0.11.14 | 108 | 9/22/2023 |
0.11.13 | 109 | 9/22/2023 |
0.11.12 | 137 | 9/22/2023 |
0.11.11 | 415 | 9/22/2023 |
0.11.10 | 189 | 9/22/2023 |
0.11.9 | 137 | 9/21/2023 |
0.11.8 | 452 | 6/2/2023 |
0.11.7 | 552 | 6/2/2023 |
0.11.6 | 342 | 4/8/2023 |
0.11.5 | 625 | 4/2/2023 |
0.11.4 | 249 | 4/2/2023 |
0.11.0 | 1,423 | 3/26/2023 |
0.10.1 | 291 | 3/26/2023 |
0.10.0 | 193 | 3/26/2023 |
0.9.0 | 277 | 3/26/2023 |
0.8.2 | 193 | 3/26/2023 |
0.8.1 | 648 | 3/26/2023 |
0.8.0 | 253 | 3/26/2023 |
0.7.0 | 210 | 3/26/2023 |
0.6.5 | 295 | 3/25/2023 |
0.6.3 | 299 | 3/25/2023 |
0.6.1 | 296 | 3/25/2023 |
0.6.0 | 284 | 3/25/2023 |
0.5.0 | 281 | 3/25/2023 |
0.4.4 | 218 | 3/25/2023 |
0.4.2 | 274 | 3/25/2023 |
0.4.0 | 291 | 3/25/2023 |
0.3.1 | 286 | 3/25/2023 |
0.3.0 | 268 | 3/25/2023 |
0.2.0 | 280 | 3/25/2023 |
0.1.1 | 206 | 3/25/2023 |
0.1.0 | 317 | 3/25/2023 |