GyreTech.Piranha.AspNetCore.Identity.EF 1.1.0-alpha1

GyreTech PiranhaCMS Identity EF Module

A PiranhaCMS Module that handles ASP.NET Core Identity with Entity Framework as the backing store.

This is a prerelease version of GyreTech.Piranha.AspNetCore.Identity.EF.
Install-Package GyreTech.Piranha.AspNetCore.Identity.EF -Version 1.1.0-alpha1
dotnet add package GyreTech.Piranha.AspNetCore.Identity.EF --version 1.1.0-alpha1
<PackageReference Include="GyreTech.Piranha.AspNetCore.Identity.EF" Version="1.1.0-alpha1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add GyreTech.Piranha.AspNetCore.Identity.EF --version 1.1.0-alpha1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Welcome GyreTech PiranhaCMS Identity EF Module

PiranhaCMS Module that handles ASP.NET Core Identity with Entity Framework as the backing store.

Registering the Module

You register the Module by hooking it into the services. Please note that generic AspNetCore & Piranha setup has been omitted. However you should register the Module after your other Piranha CMS configurations.

public IServiceProvider ConfigureServices(IServiceCollection services) {
	.... 
	// Add addtional all available claims
	List<string[]> additionalClaims = new List<string[]>() { Piranha.Manager.Permission.All() };

	// Add Identity Security EF
	services.AddEfIdentitySecurity(o =>
	{
		o.ConnectionString = defaultConnection;
		o.InitialClaims = additionalClaims;
		o.Users = new[]
		{
			new Piranha.AspNetCore.Identity.EF.Data.EfIdentityUser(true, Permission.All())
			{
				UserName = "Admin",
				Password = "P@sswOrd1",
				FirstName = "Admin",
				LastName = "User",
			}
		};
		o.EnableFirstLastNameClaim = true;
	});
	....
}

Initialize the Module

Once the Module has been configured you initialize it. Please note that generic AspNetCore setup has been omitted.

public void Configure(IApplicationBuilder app, IHostingEnvironment env, IServiceProvider services)  {
	....

	// Initialize the Identity EF module
	app.UsePiranhaIdentityEFSecurity();

	....
}

Welcome GyreTech PiranhaCMS Identity EF Module

PiranhaCMS Module that handles ASP.NET Core Identity with Entity Framework as the backing store.

Registering the Module

You register the Module by hooking it into the services. Please note that generic AspNetCore & Piranha setup has been omitted. However you should register the Module after your other Piranha CMS configurations.

public IServiceProvider ConfigureServices(IServiceCollection services) {
	.... 
	// Add addtional all available claims
	List<string[]> additionalClaims = new List<string[]>() { Piranha.Manager.Permission.All() };

	// Add Identity Security EF
	services.AddEfIdentitySecurity(o =>
	{
		o.ConnectionString = defaultConnection;
		o.InitialClaims = additionalClaims;
		o.Users = new[]
		{
			new Piranha.AspNetCore.Identity.EF.Data.EfIdentityUser(true, Permission.All())
			{
				UserName = "Admin",
				Password = "P@sswOrd1",
				FirstName = "Admin",
				LastName = "User",
			}
		};
		o.EnableFirstLastNameClaim = true;
	});
	....
}

Initialize the Module

Once the Module has been configured you initialize it. Please note that generic AspNetCore setup has been omitted.

public void Configure(IApplicationBuilder app, IHostingEnvironment env, IServiceProvider services)  {
	....

	// Initialize the Identity EF module
	app.UsePiranhaIdentityEFSecurity();

	....
}

Release Notes

Support Piranha 4.1

Version History

Version Downloads Last updated
1.1.0-alpha1 312 12/31/2017
1.0.8 312 12/26/2017
1.0.7 306 12/25/2017
1.0.6 248 12/3/2017
1.0.5 217 12/3/2017
1.0.4 275 11/26/2017
1.0.3 313 11/25/2017