AspNetCore.Identity.AmazonDynamoDB
1.2.0
See the version list below for details.
dotnet add package AspNetCore.Identity.AmazonDynamoDB --version 1.2.0
NuGet\Install-Package AspNetCore.Identity.AmazonDynamoDB -Version 1.2.0
<PackageReference Include="AspNetCore.Identity.AmazonDynamoDB" Version="1.2.0" />
paket add AspNetCore.Identity.AmazonDynamoDB --version 1.2.0
#r "nuget: AspNetCore.Identity.AmazonDynamoDB, 1.2.0"
// Install AspNetCore.Identity.AmazonDynamoDB as a Cake Addin #addin nuget:?package=AspNetCore.Identity.AmazonDynamoDB&version=1.2.0 // Install AspNetCore.Identity.AmazonDynamoDB as a Cake Tool #tool nuget:?package=AspNetCore.Identity.AmazonDynamoDB&version=1.2.0
AspNetCore.Identity.AmazonDynamoDB
An ASP.NET Core Identity 8.0 provider for DynamoDB.
Getting Started
You can install the latest version via Nuget:
> dotnet add package AspNetCore.Identity.AmazonDynamoDB
Then you use the stores by calling AddDynamoDbStores
on IdentityBuilder
:
services
.AddIdentityCore<DynamoDbUser>()
.AddRoles<DynamoDbRole>()
.AddDynamoDbStores()
.Configure(options =>
{
options.BillingMode = BillingMode.PROVISIONED; // Default is BillingMode.PAY_PER_REQUEST
options.ProvisionedThroughput = new ProvisionedThroughput
{
ReadCapacityUnits = 5, // Default is 1
WriteCapacityUnits = 5, // Default is 1
};
options.DefaultTableName = "my-custom-identity-table-name"; // Default is identity
});
Finally, you need to ensure that tables and indexes have been added:
AspNetCoreIdentityDynamoDbSetup.EnsureInitialized(serviceProvider);
Or asynchronously:
await AspNetCoreIdentityDynamoDbSetup.EnsureInitializedAsync(serviceProvider);
Tests
To run the tests, you need to have DynamoDB running locally on localhost:8000
. This can easily be done using Docker and the following command:
docker run -p 8000:8000 amazon/dynamodb-local
Adding Attributes
To add custom attributes to the user or role model, you would need to create a new class that extends the DynamoDbUser
or DynamoDbRole
and adds the needed additional attributes.
public class CustomUser : DynamoDbUser
{
public string? ProfilePictureUrl { get; set; }
}
Then you need to use your new classes when adding the DynamoDB stores:
services
.AddIdentityCore<CustomUser>()
.AddRoles<CustomRole>()
.AddDynamoDbStores();
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. 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. |
-
net6.0
- AWSSDK.DynamoDBv2 (>= 3.7.304.4)
- Microsoft.Extensions.Identity.Stores (>= 8.0.6)
-
net8.0
- AWSSDK.DynamoDBv2 (>= 3.7.304.4)
- Microsoft.Extensions.Identity.Stores (>= 8.0.6)
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 |
---|---|---|
1.2.4 | 419 | 10/4/2024 |
1.2.3 | 85 | 10/4/2024 |
1.2.1 | 157 | 9/26/2024 |
1.2.0 | 619 | 7/7/2024 |
1.1.3 | 868 | 3/23/2024 |
1.1.2 | 195 | 1/22/2024 |
1.1.1 | 114 | 1/21/2024 |
1.1.0 | 243 | 11/27/2023 |
1.0.2 | 489 | 10/29/2023 |
1.0.1 | 1,111 | 1/28/2023 |
1.0.0 | 381 | 1/6/2023 |
0.2.0 | 426 | 10/15/2022 |
0.1.3 | 389 | 10/5/2022 |
0.1.2 | 366 | 10/5/2022 |
0.1.1 | 357 | 10/2/2022 |
0.1.0 | 355 | 10/2/2022 |