Extend asp.net identity OWIN authentication framework to work with Amazon DynamoDb
amazon-dynamodb, asp.net-identity, c#, owin, webforms
Solution
The classes in `Microsoft.AspNet.Identity.Core` have no dependency on Entity Framework and can be used with any persistence store. You will need to provide your own version of the UserStore and possibly the RoleStore (if you need it) classes from `Microsoft.AspNet.Identity.EntityFramework` though. You don't want to include `Microsoft.AspNet.Identity.EntityFramework` when using a NoSQL database.
Depending on what you need you will have to implement a number of interfaces on you UserStore. You need to at least implement `IUserStore`, `IUserPasswordStore`, `IUserSecurityStampStore` and `IUserLoginStore`. The Microsoft provided Entity Framework `UserStore` implements `IUserClaimStore<TUser>` and `IUserRoleStore<TUser>` which you may or may not need to implement depending on what methods of the UserManager you will call.
Assuming that you skip IUserClaimStore and IUserRoleStore, it's 14 methods to implement, most of them pretty straight forward to implement though. These 14 methods is enough to support the parts that are used from the AccountController from the default templates.
I have a project on GitHub where I tried something similar myself, i.e. I implemented a UserStore that use MongoDb instead of EntityFramework for persistence.
Problem
I am planning to use Amazons NoSQL DynamoDB instead of MS SQL Server with newest ASP.NET Identity (OWIN) framework that ships with Visual Studio 2013 but find that its tightly coupled with Microsoft's Entity Framework. I am using WebForm not MVC. Any suggestion on how to approach this? What classes needs to be overridden? Would DynamoDB even work with EF?