Updating auth in DatBased submodule

This commit is contained in:
Max 2024-09-27 02:40:39 +02:00
parent aeb2038b81
commit bc619c62cb
6 changed files with 18 additions and 4 deletions

@ -1 +1 @@
Subproject commit c092b8a679c218c845e4981deb7b5b5dd174a311
Subproject commit 0fed89e140c1500495e01f1f836416f107dcdbce

View File

@ -0,0 +1,5 @@
namespace DotBased.Identity;
public class Class1
{
}

View File

@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>

View File

@ -23,10 +23,10 @@ builder.Services.AddBasedServerAuth(options =>
options.LogoutPath = "/auth/logout";
options.SeedData = service =>
{
service.CreateUserAsync(new UserModel() { UserName = "Admin", Email = "admin@example.com", Enabled = true, PasswordHash = "password", Roles = new List<RoleModel>() { new RoleModel() { Name = "Admin", Description = "Administration role." }}});
service.CreateUserAsync(new UserModel() { UserName = "User", Email = "user@example.com", Enabled = true, PasswordHash = "password"});
/*service.CreateUserAsync(new UserModel() { UserName = "Admin", Email = "admin@example.com", Enabled = true, PasswordHash = "password", Roles = new List<RoleModel>() { new RoleModel() { Name = "Admin", Description = "Administration role." }}});
service.CreateUserAsync(new UserModel() { UserName = "User", Email = "user@example.com", Enabled = true, PasswordHash = "password"});*/
};
options.SetDataProviderType<MemoryAuthDataProvider>();
options.SetDataRepositoryType<MemoryAuthDataRepository>();
options.SetSessionStateProviderType<LocalStorageSessionStateProvider>();
});

Binary file not shown.