The Simple Security implementation is a simple user & authentication manager for development purposes. It does not persist any user data, instead the current user accounts are added into memory on application startup. It is not recommended to use Simple Security for production environments.
Simple Security depends on the HttpContext
in order to sign in a user and can't be used for other types of applications.
The Simple Security can be installed by adding the NuGet package:
PM> install-package Piranha.AspNetCore.SimpleSecurity
You register Simple Security in ConfigureServices()
with the following call:
services.AddPiranhaSimpleSecurity(
new Piranha.AspNetCore.SimpleUser(Piranha.Manager.Permission.All())
{
UserName = "admin",
Password = "password"
},
...
);
Here you can create any number of users with different permissions that you need for your development environment.