Skip to content

Commit

Permalink
initial rename to cosmosdb
Browse files Browse the repository at this point in the history
  • Loading branch information
dlmelendez committed Nov 10, 2019
1 parent 85eb98a commit be691c4
Show file tree
Hide file tree
Showing 37 changed files with 161 additions and 158 deletions.
58 changes: 58 additions & 0 deletions ElCamino.AspNetCore.Identity.CosmosDB.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29503.13
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{76E6FCF1-1099-40C3-BAEB-AA6345DE180A}"
ProjectSection(SolutionItems) = preProject
.gitignore = .gitignore
LICENSE = LICENSE
README.md = README.md
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ElCamino.AspNetCore.Identity.CosmosDB", "src\ElCamino.AspNetCore.Identity.CosmosDB\ElCamino.AspNetCore.Identity.CosmosDB.csproj", "{311A8C71-9E5D-434D-BE8A-27ABBB820F5C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ElCamino.AspNetCore.Identity.CosmosDB.Tests", "tests\ElCamino.AspNetCore.Identity.CosmosDB.Tests\ElCamino.AspNetCore.Identity.CosmosDB.Tests.csproj", "{0279C5B2-8E9B-4D50-9F89-E35F15FFB3A0}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{311A8C71-9E5D-434D-BE8A-27ABBB820F5C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{311A8C71-9E5D-434D-BE8A-27ABBB820F5C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{311A8C71-9E5D-434D-BE8A-27ABBB820F5C}.Debug|x64.ActiveCfg = Debug|Any CPU
{311A8C71-9E5D-434D-BE8A-27ABBB820F5C}.Debug|x64.Build.0 = Debug|Any CPU
{311A8C71-9E5D-434D-BE8A-27ABBB820F5C}.Debug|x86.ActiveCfg = Debug|Any CPU
{311A8C71-9E5D-434D-BE8A-27ABBB820F5C}.Debug|x86.Build.0 = Debug|Any CPU
{311A8C71-9E5D-434D-BE8A-27ABBB820F5C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{311A8C71-9E5D-434D-BE8A-27ABBB820F5C}.Release|Any CPU.Build.0 = Release|Any CPU
{311A8C71-9E5D-434D-BE8A-27ABBB820F5C}.Release|x64.ActiveCfg = Release|Any CPU
{311A8C71-9E5D-434D-BE8A-27ABBB820F5C}.Release|x64.Build.0 = Release|Any CPU
{311A8C71-9E5D-434D-BE8A-27ABBB820F5C}.Release|x86.ActiveCfg = Release|Any CPU
{311A8C71-9E5D-434D-BE8A-27ABBB820F5C}.Release|x86.Build.0 = Release|Any CPU
{0279C5B2-8E9B-4D50-9F89-E35F15FFB3A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0279C5B2-8E9B-4D50-9F89-E35F15FFB3A0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0279C5B2-8E9B-4D50-9F89-E35F15FFB3A0}.Debug|x64.ActiveCfg = Debug|Any CPU
{0279C5B2-8E9B-4D50-9F89-E35F15FFB3A0}.Debug|x64.Build.0 = Debug|Any CPU
{0279C5B2-8E9B-4D50-9F89-E35F15FFB3A0}.Debug|x86.ActiveCfg = Debug|Any CPU
{0279C5B2-8E9B-4D50-9F89-E35F15FFB3A0}.Debug|x86.Build.0 = Debug|Any CPU
{0279C5B2-8E9B-4D50-9F89-E35F15FFB3A0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0279C5B2-8E9B-4D50-9F89-E35F15FFB3A0}.Release|Any CPU.Build.0 = Release|Any CPU
{0279C5B2-8E9B-4D50-9F89-E35F15FFB3A0}.Release|x64.ActiveCfg = Release|Any CPU
{0279C5B2-8E9B-4D50-9F89-E35F15FFB3A0}.Release|x64.Build.0 = Release|Any CPU
{0279C5B2-8E9B-4D50-9F89-E35F15FFB3A0}.Release|x86.ActiveCfg = Release|Any CPU
{0279C5B2-8E9B-4D50-9F89-E35F15FFB3A0}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {F619F8B3-37B9-4282-81EB-FAAC236C702E}
EndGlobalSection
EndGlobal
55 changes: 0 additions & 55 deletions ElCamino.AspNetCore.Identity.DocumentDB.sln

This file was deleted.

46 changes: 23 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# identitycoredocumentdb
# identitycosmosdb

This project is an open source high performance plugin to ASP.NET Core Identity framework using Azure CosmosDB/DocumentDB.
This project is an open source high performance plugin to ASP.NET Core Identity framework using Azure CosmosDB.

[![NuGet Badge](https://buildstats.info/nuget/ElCamino.AspNetCore.Identity.DocumentDB)](https://www.nuget.org/packages/ElCamino.AspNetCore.Identity.DocumentDB/)
[![NuGet Badge](https://buildstats.info/nuget/ElCamino.AspNetCore.Identity.CosmosDB)](https://www.nuget.org/packages/ElCamino.AspNetCore.Identity.CosmosDB/)

Identity Core 3.x - Use ElCamino.AspNetCore.Identity.AzureTable, sample Mvc app: https://github.com/dlmelendez/identitycoredocumentdb/tree/master/sample/samplecore3.mvc
Identity Core 3.x - Use ElCamino.AspNetCore.Identity.AzureTable, sample Mvc app: https://github.com/dlmelendez/identitycosmosdb/tree/master/sample/samplecore3.mvc

Identity Core 2.x - Use ElCamino.AspNetCore.Identity.AzureTable, sample Mvc app: https://github.com/dlmelendez/identitycoredocumentdb/tree/master/sample/samplecore2.mvc
Identity Core 2.x - Use ElCamino.AspNetCore.Identity.AzureTable, sample Mvc app: https://github.com/dlmelendez/identitycosmosdb/tree/master/sample/samplecore2.mvc

Identity Core 1.x - Use ElCamino.AspNetCore.Identity.AzureTable, sample Mvc app: https://github.com/dlmelendez/identitycoredocumentdb/tree/master/sample/samplecore.mvc
Identity Core 1.x - Use ElCamino.AspNetCore.Identity.AzureTable, sample Mvc app: https://github.com/dlmelendez/identitycosmosdb/tree/master/sample/samplecore.mvc

## Quick Start for Identity Core 2
## Quick Start for Identity Core 3

Download the CosmosDB [emulator](https://docs.microsoft.com/en-us/azure/cosmos-db/local-emulator) or setup an [instance in Azure](https://docs.microsoft.com/en-us/azure/cosmos-db/create-documentdb-dotnet).

Expand All @@ -19,7 +19,7 @@ Remove the NuGet packages EntityFramework and Microsoft.AspNetCore.Identity.Enti
##### Simplify your project references
```xml
<ItemGroup>
<PackageReference Include="ElCamino.AspNetCore.Identity.DocumentDB" Version="2.0.0" />
<PackageReference Include="ElCamino.AspNetCore.Identity.CosmosDB" Version="3.0.0" />
<PackageReference Include="Microsoft.AspNetCore" Version="2.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.Cookies" Version="2.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.0.0" />
Expand All @@ -37,30 +37,30 @@ Remove the NuGet packages EntityFramework and Microsoft.AspNetCore.Identity.Enti
Remove all using statements referencing EntityFramework.
Delete the /Data/Migrations directory and all files in it.

##### Changes to [/Models/ApplicationUser.cs](https://github.com/dlmelendez/identitycoredocumentdb/blob/master/sample/samplecore2.mvc/Models/ApplicationUser.cs)
##### Changes to [/Models/ApplicationUser.cs](https://github.com/dlmelendez/identitycosmosdb/blob/master/sample/samplecore2.mvc/Models/ApplicationUser.cs)
```C#
using IdentityUser = ElCamino.AspNetCore.Identity.DocumentDB.Model.IdentityUser;
using IdentityUser = ElCamino.AspNetCore.Identity.CosmosDB.Model.IdentityUser;
...
// Add profile data for application users by adding properties to the ApplicationUser class
public class ApplicationUser : IdentityUser
{
}
```
##### Changes to [/Data/ApplicationDbContext.cs](https://github.com/dlmelendez/identitycoredocumentdb/blob/master/sample/samplecore2.mvc/Data/ApplicationDbContext.cs)
##### Changes to [/Data/ApplicationDbContext.cs](https://github.com/dlmelendez/identitycosmosdb/blob/master/sample/samplecore2.mvc/Data/ApplicationDbContext.cs)
```C#
using ElCamino.AspNetCore.Identity.DocumentDB;
using ElCamino.AspNetCore.Identity.DocumentDB.Model;
using ElCamino.AspNetCore.Identity.CosmosDB;
using ElCamino.AspNetCore.Identity.CosmosDB.Model;
...
public class ApplicationDbContext : IdentityCloudContext
{
public ApplicationDbContext(IdentityConfiguration config) : base(config) { }
}
```
##### Changes to [/Startup.cs](https://github.com/dlmelendez/identitycoredocumentdb/blob/master/sample/samplecore2.mvc/Startup.cs)
##### Changes to [/Startup.cs](https://github.com/dlmelendez/identitycosmosdb/blob/master/sample/samplecore2.mvc/Startup.cs)
```c#
using ElCamino.AspNetCore.Identity.DocumentDB.Model;
using ElCamino.AspNetCore.Identity.CosmosDB.Model;
using Microsoft.Azure.Documents.Client;
using IdentityRole = ElCamino.AspNetCore.Identity.DocumentDB.Model.IdentityRole;
using IdentityRole = ElCamino.AspNetCore.Identity.CosmosDB.Model.IdentityRole;
...
public class Startup
{
Expand All @@ -69,14 +69,14 @@ using IdentityRole = ElCamino.AspNetCore.Identity.DocumentDB.Model.IdentityRole;
public void ConfigureServices(IServiceCollection services)
{
services.AddIdentity<ApplicationUser, IdentityRole>()
.AddDocumentDBStores<ApplicationDbContext>(() =>
.AddCosmosDBStores<ApplicationDbContext>(() =>
{
return new IdentityConfiguration()
{
Uri = Configuration["IdentityDocumentDB:identityConfiguration:uri"],
AuthKey = Configuration["IdentityDocumentDB:identityConfiguration:authKey"],
Database = Configuration["IdentityDocumentDB:identityConfiguration:database"],
IdentityCollection = Configuration["IdentityDocumentDB:identityConfiguration:identityCollection"],
Uri = Configuration["IdentityCosmosDB:identityConfiguration:uri"],
AuthKey = Configuration["IdentityCosmosDB:identityConfiguration:authKey"],
Database = Configuration["IdentityCosmosDB:identityConfiguration:database"],
IdentityCollection = Configuration["IdentityCosmosDB:identityConfiguration:identityCollection"],
Policy = new ConnectionPolicy()
{
ConnectionMode = ConnectionMode.Gateway,
Expand All @@ -86,12 +86,12 @@ using IdentityRole = ElCamino.AspNetCore.Identity.DocumentDB.Model.IdentityRole;
}).AddDefaultTokenProviders();
...
```
##### Changes to [/appsettings.json](https://github.com/dlmelendez/identitycoredocumentdb/blob/master/sample/samplecore2.mvc/appsettings.json)
##### Changes to [/appsettings.json](https://github.com/dlmelendez/identitycosmosdb/blob/master/sample/samplecore2.mvc/appsettings.json)
Defaults for the local CosmosDB emulator. database and collection need to follow the CosmosDB naming rules, otherwise use whatever you like.
```json
{
...
"IdentityDocumentDB": {
"IdentityCosmosDB": {
"identityConfiguration": {
"uri": "https://localhost:8081",
"authKey": "C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using System.Text;
using System.Threading.Tasks;

namespace ElCamino.AspNetCore.Identity.DocumentDB
namespace ElCamino.AspNetCore.Identity.CosmosDB
{
public static class Constants
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,29 @@
<PropertyGroup>
<Description>Azure CosmosDB Provider to support AspNet Identity Core frameworks for .NET.</Description>
<Copyright>Copyright © 2019 David Melendez, MIT License</Copyright>
<AssemblyTitle>Azure DocumentDB Provider for ASP.NET Identity Core</AssemblyTitle>
<AssemblyTitle>Azure CosmosDB Provider for ASP.NET Identity Core</AssemblyTitle>
<Authors>David Melendez</Authors>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<AssemblyName>ElCamino.AspNetCore.Identity.DocumentDB</AssemblyName>
<AssemblyName>ElCamino.AspNetCore.Identity.CosmosDB</AssemblyName>
<AssemblyOriginatorKeyFile>../../tools/Key.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>
<PackageId>ElCamino.AspNetCore.Identity.DocumentDB</PackageId>
<PackageTags>ASP.NET;Identity Core;Azure;CosmosDB;DocumentDB;MVC;UserStore;RoleStore;UserManager;Microsoft.AspNetCore.Identity</PackageTags>
<PackageId>ElCamino.AspNetCore.Identity.CosmosDB</PackageId>
<PackageTags>ASP.NET;Identity Core;Azure;CosmosDB;MVC;UserStore;RoleStore;UserManager;Microsoft.AspNetCore.Identity</PackageTags>
<PackageReleaseNotes>
Check https://github.com/dlmelendez/identitycoredocumentdb/releases for the latest release information.
Check https://github.com/dlmelendez/identitycosmosdb/releases for the latest release information.

</PackageReleaseNotes>
<PackageIcon>projectNugetPic.png</PackageIcon>
<PackageLicenseUrl></PackageLicenseUrl>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/dlmelendez/identitycoredocumentdb.git</RepositoryUrl>
<RepositoryUrl>https://github.com/dlmelendez/identitycosmosdb.git</RepositoryUrl>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<Version>2.2.0</Version>
<AssemblyVersion>2.2.0.0</AssemblyVersion>
<FileVersion>2.2.0.0</FileVersion>
<PackageProjectUrl>https://github.com/dlmelendez/identitycoredocumentdb</PackageProjectUrl>
<Version>3.0.0</Version>
<AssemblyVersion>3.0.0.0</AssemblyVersion>
<FileVersion>3.0.0.0</FileVersion>
<PackageProjectUrl>https://github.com/dlmelendez/identitycosmosdb</PackageProjectUrl>
<DebugType>Full</DebugType>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<IncludeSymbols>true</IncludeSymbols>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using System.Threading;
using System.Threading.Tasks;

namespace ElCamino.AspNetCore.Identity.DocumentDB.Extensions
namespace ElCamino.AspNetCore.Identity.CosmosDB.Extensions
{
internal static class IQueryableExtensions
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// MIT License Copyright 2019 (c) David Melendez. All rights reserved. See License.txt in the project root for license information.
using System.Threading.Tasks;

namespace ElCamino.AspNetCore.Identity.DocumentDB.Extensions
namespace ElCamino.AspNetCore.Identity.CosmosDB.Extensions
{
internal static class TaskCacheExtensions
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System.Security.Cryptography;
using System.Text;

namespace ElCamino.AspNetCore.Identity.DocumentDB.Helpers
namespace ElCamino.AspNetCore.Identity.CosmosDB.Helpers
{
public static class HashHelper
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// MIT License Copyright 2019 (c) David Melendez. All rights reserved. See License.txt in the project root for license information.
using ElCamino.AspNetCore.Identity.DocumentDB.Model;
using ElCamino.AspNetCore.Identity.CosmosDB.Model;
using Microsoft.Azure.Documents;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Text;

namespace ElCamino.AspNetCore.Identity.DocumentDB.Helpers
namespace ElCamino.AspNetCore.Identity.CosmosDB.Helpers
{
public static class JsonHelpers
{
Expand Down

0 comments on commit be691c4

Please sign in to comment.