![]() |
VOOZH | about |
dotnet add package Cosmos.Identity --version 2.0.0
NuGet\Install-Package Cosmos.Identity -Version 2.0.0
<PackageReference Include="Cosmos.Identity" Version="2.0.0" />
<PackageVersion Include="Cosmos.Identity" Version="2.0.0" />Directory.Packages.props
<PackageReference Include="Cosmos.Identity" />Project file
paket add Cosmos.Identity --version 2.0.0
#r "nuget: Cosmos.Identity, 2.0.0"
#:package Cosmos.Identity@2.0.0
#addin nuget:?package=Cosmos.Identity&version=2.0.0Install as a Cake Addin
#tool nuget:?package=Cosmos.Identity&version=2.0.0Install as a Cake Tool
Cosmos DB provider for ASP.NET Core Identity framework
The Cosmos.Identity library is available on nuget.org via package name Cosmos.Identity.
To install Cosmos.Identity, run the following command in the Package Manager Console
PM> Install-Package Cosmos.Identity
More information about NuGet package available at https://nuget.org/packages/Cosmos.Identity
appsettings.json configuration
{
"CosmosRepository": {
"ConnectionString": "AccountEndpoint=https://localhost:8081/;AccountKey=C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==",
"DatabaseId": "SampleWebsite",
"OptimizeBandwidth": false,
"AllowBulkExecution": true
}
}
Startup.cs
using Cosmos.Identity;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Identity;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using IdentityRole = Cosmos.Identity.IdentityRole;
using IdentityUser = Cosmos.Identity.IdentityUser;
namespace Sample.Website
{
public class Startup
{
public Startup(IConfiguration configuration)
{
Configuration = configuration;
}
public IConfiguration Configuration { get; }
public void ConfigureServices(IServiceCollection services)
{
services.AddCosmosRepository();
services
.AddIdentity<IdentityUser, IdentityRole>()
.AddCosmosStores()
.AddDefaultUI()
.AddDefaultTokenProviders();
services.AddRazorPages();
}
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
app.UseHttpsRedirection();
app.UseStaticFiles();
app.UseRouting();
app.UseAuthentication();
app.UseAuthorization();
app.UseEndpoints(endpoints =>
{
endpoints.MapRazorPages();
});
}
}
}
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0 net6.0 is compatible. net6.0-android net6.0-android was computed. net6.0-ios net6.0-ios was computed. net6.0-maccatalyst net6.0-maccatalyst was computed. net6.0-macos net6.0-macos was computed. net6.0-tvos net6.0-tvos was computed. net6.0-windows net6.0-windows was computed. net7.0 net7.0 is compatible. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 was computed. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.0.0 | 1,166 | 7/29/2023 |
| 1.1.60 | 1,226 | 12/22/2021 |
| 1.0.0.28 | 612 | 10/21/2021 |
| 1.0.0.14 | 796 | 7/9/2021 |
| 1.0.0.13 | 669 | 4/25/2021 |
| 1.0.0.12 | 616 | 4/22/2021 |
| 1.0.0.11 | 608 | 4/17/2021 |
| 1.0.0.10 | 683 | 3/11/2021 |
| 1.0.0.9 | 634 | 3/8/2021 |
| 1.0.0.8 | 597 | 3/5/2021 |
| 1.0.0.7 | 637 | 2/15/2021 |
| 0.1.0.1 | 649 | 2/14/2021 |