Marten.AspNetIdentity
8.0.14
dotnet add package Marten.AspNetIdentity --version 8.0.14
NuGet\Install-Package Marten.AspNetIdentity -Version 8.0.14
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Marten.AspNetIdentity" Version="8.0.14" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Marten.AspNetIdentity --version 8.0.14
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Marten.AspNetIdentity, 8.0.14"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Marten.AspNetIdentity as a Cake Addin #addin nuget:?package=Marten.AspNetIdentity&version=8.0.14 // Install Marten.AspNetIdentity as a Cake Tool #tool nuget:?package=Marten.AspNetIdentity&version=8.0.14
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
MartenAspNetIdentity
MartenAspNetIdentity is a Marten DocumentDb implementation of Microsoft.AspNetCore.Identity.
Example usage
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
services.AddLogging();
string connectionString = "server=localhost;database=aspnetidentity;uid=aspnetidentity;pwd=aspnetidentity;";
services.AddIdentity<ApplicationUser, IdentityRole>()
.AddMartenStores<ApplicationUser, IdentityRole>(connectionString)
.AddDefaultTokenProviders();
// more service wireup...
}
ApplicationUser
is your user class to store.IdentityRole
is the role to store.
This will create an IDocumentStore
for you, create a database and using the connection string provided, and add it to your services. If you already have an IDocumentStore
configured in your DI container, you can use the overload without the connection string, the MartenAspNetIdentity will use this for its managers:
services.AddIdentity<ApplicationUser, IdentityRole>()
.AddMartenStores<ApplicationUser, IdentityRole>()
.AddDefaultTokenProviders();
There is a full example in this repository under the Example project
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- Marten (>= 7.31.0)
- Microsoft.Extensions.DependencyInjection (>= 8.0.1)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.2)
- Microsoft.Extensions.Identity.Core (>= 8.0.10)
- Microsoft.Extensions.Identity.Stores (>= 8.0.10)
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.2)
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 |
---|---|---|
8.0.14 | 244 | 10/28/2024 |
8.0.12 | 80 | 10/28/2024 |
1.0.33 | 2,700 | 11/12/2019 |
1.0.30 | 1,402 | 4/3/2019 |
1.0.29 | 1,279 | 12/17/2018 |
1.0.28 | 1,224 | 12/17/2018 |
1.0.27 | 1,237 | 12/16/2018 |
1.0.26 | 1,359 | 11/1/2018 |
1.0.25 | 1,252 | 10/31/2018 |
1.0.24 | 1,288 | 10/31/2018 |
1.0.23 | 1,346 | 10/8/2018 |
1.0.22 | 1,340 | 10/2/2018 |
1.0.21 | 1,314 | 9/30/2018 |
1.0.20 | 1,268 | 9/30/2018 |
1.0.19 | 1,526 | 6/20/2018 |
1.0.18 | 1,460 | 6/20/2018 |
1.0.17 | 1,508 | 6/19/2018 |