Skip to content

Xiippy/Xiippy.OpenIddict.AmazonDynamoDB.Stores

Repository files navigation

Xiippy.OpenIddict.AmazonDynamoDB.Stores

Xiippy's port of https://github.com/ganhammar/OpenIddict.AmazonDynamoDB/ to OpenIDDict 5.1 with new interface implementations

Critical: Data schema for tokens and authorizations have been modified to improve performance and reduce costs by avoiding the use of the DynamoDB SCAN operation. Feel free to use for fresh starts but if you have a running system, you may need to migrate data to make everything work as before smoothly after upgrading to this version!

Build Status codecov NuGet

A DynamoDB integration for OpenIddict.

Getting Started

You can install the latest version via Nuget:

> dotnet add package Community.OpenIddict.AmazonDynamoDB

Then you use the stores by calling AddDynamoDbStores on OpenIddictBuilder:

services
    .AddOpenIddict()
    .AddCore()
    .UseDynamoDb()
    .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.UsersTableName = "CustomOpenIddictTable"; // Default is openiddict
    });

Finally, you need to ensure that tables and indexes have been added:

OpenIddictDynamoDbSetup.EnsureInitialized(serviceProvider);

Or asynchronously:

await OpenIddictDynamoDbSetup.EnsureInitializedAsync(serviceProvider);

Tests

In order 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

About

Xiippy's port of https://github.com/ganhammar/OpenIddict.AmazonDynamoDB/ to OpenIDDict 5.1 with new interface implementations

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages