Skip to content

Commit

Permalink
Feat/isolation (#632)
Browse files Browse the repository at this point in the history
* feat:add stack isolation

* feat:update env

* feat:update public

* feat:udpate sln

* feat:update stakc isolation

* fix:IsolationConsts

* fix:unit test

* fix:code smell

* fix:code smell

* fix:code smell

* refactor:set data method
  • Loading branch information
MayueCif authored Jun 26, 2023
1 parent e635a80 commit 3de695b
Show file tree
Hide file tree
Showing 46 changed files with 902 additions and 88 deletions.
66 changes: 44 additions & 22 deletions Masa.Framework.sln
Original file line number Diff line number Diff line change
Expand Up @@ -681,19 +681,23 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Masa.Contrib.StackSdks.Aler
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Scenes", "Scenes", "{CD5365A1-1781-4088-A9A2-EC58F3581D3B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Masa.Contrib.Storage.ObjectStorage.Aliyun.Tests.Isolation", "src\Contrib\Storage\ObjectStorage\Tests\Masa.Contrib.Storage.ObjectStorage.Aliyun.Tests.Isolation\Masa.Contrib.Storage.ObjectStorage.Aliyun.Tests.Isolation.csproj", "{2A691CCB-E2A0-408D-BC2D-7D2157B3E85A}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Masa.Contrib.Storage.ObjectStorage.Aliyun.Tests.Isolation", "src\Contrib\Storage\ObjectStorage\Tests\Masa.Contrib.Storage.ObjectStorage.Aliyun.Tests.Isolation\Masa.Contrib.Storage.ObjectStorage.Aliyun.Tests.Isolation.csproj", "{2A691CCB-E2A0-408D-BC2D-7D2157B3E85A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Masa.BuildingBlocks.StackSdks.Alert", "src\BuildingBlocks\StackSdks\Masa.BuildingBlocks.StackSdks.Alert\Masa.BuildingBlocks.StackSdks.Alert.csproj", "{EEACDE24-9D4A-4F65-B13A-644E89A7918D}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{3C12BE69-247B-4448-9700-0ACEE8440A34}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Masa.Contrib.StackSdks.Alert.Tests", "src\Contrib\StackSdks\Tests\Masa.Contrib.StackSdks.Alert.Tests\Masa.Contrib.StackSdks.Alert.Tests.csproj", "{1221F32F-7310-49FF-94DD-2BCF570E03F2}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Masa.Contrib.StackSdks.Alert.Tests", "src\Contrib\StackSdks\Tests\Masa.Contrib.StackSdks.Alert.Tests\Masa.Contrib.StackSdks.Alert.Tests.csproj", "{1221F32F-7310-49FF-94DD-2BCF570E03F2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Masa.Contrib.Data.UoW.EFCore.Tests", "src\Contrib\Data\UoW\Tests\Masa.Contrib.Data.UoW.EFCore.Tests\Masa.Contrib.Data.UoW.EFCore.Tests.csproj", "{9208B446-A7E0-4B5A-A42D-37E63B76E875}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Masa.Contrib.Data.UoW.EFCore.Tests", "src\Contrib\Data\UoW\Tests\Masa.Contrib.Data.UoW.EFCore.Tests\Masa.Contrib.Data.UoW.EFCore.Tests.csproj", "{9208B446-A7E0-4B5A-A42D-37E63B76E875}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Scenes", "Scenes", "{02591EE4-1033-4575-984F-7AB290E7C6FA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Masa.Contrib.Data.EFCore.Tests.Scenes.Isolation", "src\Contrib\Data\Orm\EFCore\Scenes\Masa.Contrib.Data.EFCore.Tests.Scenes.Isolation\Masa.Contrib.Data.EFCore.Tests.Scenes.Isolation.csproj", "{A5B30EEA-2DE1-4233-8584-936CB862191B}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Masa.Contrib.Data.EFCore.Tests.Scenes.Isolation", "src\Contrib\Data\Orm\EFCore\Scenes\Masa.Contrib.Data.EFCore.Tests.Scenes.Isolation\Masa.Contrib.Data.EFCore.Tests.Scenes.Isolation.csproj", "{A5B30EEA-2DE1-4233-8584-936CB862191B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Masa.Contrib.StackSdks.Isolation", "src\Contrib\StackSdks\Masa.Contrib.StackSdks.Isolation\Masa.Contrib.StackSdks.Isolation.csproj", "{6E853D47-6C4F-4102-85A2-31EB172FB864}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Masa.BuildingBlocks.StackSdks.Isolation", "src\BuildingBlocks\StackSdks\Masa.BuildingBlocks.StackSdks.Isolation\Masa.BuildingBlocks.StackSdks.Isolation.csproj", "{4B175C6B-F5BE-4B65-BFCC-A949CA5BC6A3}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down Expand Up @@ -2455,22 +2459,6 @@ Global
{B57859AD-720E-41D2-9C15-85F49AC73D18}.Release|Any CPU.Build.0 = Release|Any CPU
{B57859AD-720E-41D2-9C15-85F49AC73D18}.Release|x64.ActiveCfg = Release|Any CPU
{B57859AD-720E-41D2-9C15-85F49AC73D18}.Release|x64.Build.0 = Release|Any CPU
{2A691CCB-E2A0-408D-BC2D-7D2157B3E85A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2A691CCB-E2A0-408D-BC2D-7D2157B3E85A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2A691CCB-E2A0-408D-BC2D-7D2157B3E85A}.Debug|x64.ActiveCfg = Debug|Any CPU
{2A691CCB-E2A0-408D-BC2D-7D2157B3E85A}.Debug|x64.Build.0 = Debug|Any CPU
{2A691CCB-E2A0-408D-BC2D-7D2157B3E85A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2A691CCB-E2A0-408D-BC2D-7D2157B3E85A}.Release|Any CPU.Build.0 = Release|Any CPU
{2A691CCB-E2A0-408D-BC2D-7D2157B3E85A}.Release|x64.ActiveCfg = Release|Any CPU
{2A691CCB-E2A0-408D-BC2D-7D2157B3E85A}.Release|x64.Build.0 = Release|Any CPU
{9208B446-A7E0-4B5A-A42D-37E63B76E875}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9208B446-A7E0-4B5A-A42D-37E63B76E875}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9208B446-A7E0-4B5A-A42D-37E63B76E875}.Debug|x64.ActiveCfg = Debug|Any CPU
{9208B446-A7E0-4B5A-A42D-37E63B76E875}.Debug|x64.Build.0 = Debug|Any CPU
{9208B446-A7E0-4B5A-A42D-37E63B76E875}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9208B446-A7E0-4B5A-A42D-37E63B76E875}.Release|Any CPU.Build.0 = Release|Any CPU
{9208B446-A7E0-4B5A-A42D-37E63B76E875}.Release|x64.ActiveCfg = Release|Any CPU
{9208B446-A7E0-4B5A-A42D-37E63B76E875}.Release|x64.Build.0 = Release|Any CPU
{30A143AF-4E9D-457E-BDAE-DFBC5A262F4A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{30A143AF-4E9D-457E-BDAE-DFBC5A262F4A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{30A143AF-4E9D-457E-BDAE-DFBC5A262F4A}.Debug|x64.ActiveCfg = Debug|Any CPU
Expand All @@ -2479,6 +2467,14 @@ Global
{30A143AF-4E9D-457E-BDAE-DFBC5A262F4A}.Release|Any CPU.Build.0 = Release|Any CPU
{30A143AF-4E9D-457E-BDAE-DFBC5A262F4A}.Release|x64.ActiveCfg = Release|Any CPU
{30A143AF-4E9D-457E-BDAE-DFBC5A262F4A}.Release|x64.Build.0 = Release|Any CPU
{2A691CCB-E2A0-408D-BC2D-7D2157B3E85A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2A691CCB-E2A0-408D-BC2D-7D2157B3E85A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2A691CCB-E2A0-408D-BC2D-7D2157B3E85A}.Debug|x64.ActiveCfg = Debug|Any CPU
{2A691CCB-E2A0-408D-BC2D-7D2157B3E85A}.Debug|x64.Build.0 = Debug|Any CPU
{2A691CCB-E2A0-408D-BC2D-7D2157B3E85A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2A691CCB-E2A0-408D-BC2D-7D2157B3E85A}.Release|Any CPU.Build.0 = Release|Any CPU
{2A691CCB-E2A0-408D-BC2D-7D2157B3E85A}.Release|x64.ActiveCfg = Release|Any CPU
{2A691CCB-E2A0-408D-BC2D-7D2157B3E85A}.Release|x64.Build.0 = Release|Any CPU
{EEACDE24-9D4A-4F65-B13A-644E89A7918D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EEACDE24-9D4A-4F65-B13A-644E89A7918D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EEACDE24-9D4A-4F65-B13A-644E89A7918D}.Debug|x64.ActiveCfg = Debug|Any CPU
Expand All @@ -2495,6 +2491,14 @@ Global
{1221F32F-7310-49FF-94DD-2BCF570E03F2}.Release|Any CPU.Build.0 = Release|Any CPU
{1221F32F-7310-49FF-94DD-2BCF570E03F2}.Release|x64.ActiveCfg = Release|Any CPU
{1221F32F-7310-49FF-94DD-2BCF570E03F2}.Release|x64.Build.0 = Release|Any CPU
{9208B446-A7E0-4B5A-A42D-37E63B76E875}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9208B446-A7E0-4B5A-A42D-37E63B76E875}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9208B446-A7E0-4B5A-A42D-37E63B76E875}.Debug|x64.ActiveCfg = Debug|Any CPU
{9208B446-A7E0-4B5A-A42D-37E63B76E875}.Debug|x64.Build.0 = Debug|Any CPU
{9208B446-A7E0-4B5A-A42D-37E63B76E875}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9208B446-A7E0-4B5A-A42D-37E63B76E875}.Release|Any CPU.Build.0 = Release|Any CPU
{9208B446-A7E0-4B5A-A42D-37E63B76E875}.Release|x64.ActiveCfg = Release|Any CPU
{9208B446-A7E0-4B5A-A42D-37E63B76E875}.Release|x64.Build.0 = Release|Any CPU
{A5B30EEA-2DE1-4233-8584-936CB862191B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A5B30EEA-2DE1-4233-8584-936CB862191B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A5B30EEA-2DE1-4233-8584-936CB862191B}.Debug|x64.ActiveCfg = Debug|Any CPU
Expand All @@ -2503,6 +2507,22 @@ Global
{A5B30EEA-2DE1-4233-8584-936CB862191B}.Release|Any CPU.Build.0 = Release|Any CPU
{A5B30EEA-2DE1-4233-8584-936CB862191B}.Release|x64.ActiveCfg = Release|Any CPU
{A5B30EEA-2DE1-4233-8584-936CB862191B}.Release|x64.Build.0 = Release|Any CPU
{6E853D47-6C4F-4102-85A2-31EB172FB864}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6E853D47-6C4F-4102-85A2-31EB172FB864}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6E853D47-6C4F-4102-85A2-31EB172FB864}.Debug|x64.ActiveCfg = Debug|Any CPU
{6E853D47-6C4F-4102-85A2-31EB172FB864}.Debug|x64.Build.0 = Debug|Any CPU
{6E853D47-6C4F-4102-85A2-31EB172FB864}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6E853D47-6C4F-4102-85A2-31EB172FB864}.Release|Any CPU.Build.0 = Release|Any CPU
{6E853D47-6C4F-4102-85A2-31EB172FB864}.Release|x64.ActiveCfg = Release|Any CPU
{6E853D47-6C4F-4102-85A2-31EB172FB864}.Release|x64.Build.0 = Release|Any CPU
{4B175C6B-F5BE-4B65-BFCC-A949CA5BC6A3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4B175C6B-F5BE-4B65-BFCC-A949CA5BC6A3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4B175C6B-F5BE-4B65-BFCC-A949CA5BC6A3}.Debug|x64.ActiveCfg = Debug|Any CPU
{4B175C6B-F5BE-4B65-BFCC-A949CA5BC6A3}.Debug|x64.Build.0 = Debug|Any CPU
{4B175C6B-F5BE-4B65-BFCC-A949CA5BC6A3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4B175C6B-F5BE-4B65-BFCC-A949CA5BC6A3}.Release|Any CPU.Build.0 = Release|Any CPU
{4B175C6B-F5BE-4B65-BFCC-A949CA5BC6A3}.Release|x64.ActiveCfg = Release|Any CPU
{4B175C6B-F5BE-4B65-BFCC-A949CA5BC6A3}.Release|x64.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -2837,15 +2857,17 @@ Global
{94191595-7D89-4986-ADD5-620032811EAC} = {0FB9A049-E04C-40C7-9727-FD8B1265DF87}
{BC848CB9-1065-4FC5-8CB4-8EE733E18E50} = {C591947F-B9DD-4B6E-921B-C175A009FFDC}
{B57859AD-720E-41D2-9C15-85F49AC73D18} = {383995FF-B661-4E15-A830-640FC5BA8A1F}
{30A143AF-4E9D-457E-BDAE-DFBC5A262F4A} = {383995FF-B661-4E15-A830-640FC5BA8A1F}
{CD5365A1-1781-4088-A9A2-EC58F3581D3B} = {4231AB12-3FB7-408E-B7C2-9CC0FFB710B1}
{2A691CCB-E2A0-408D-BC2D-7D2157B3E85A} = {CD5365A1-1781-4088-A9A2-EC58F3581D3B}
{3C12BE69-247B-4448-9700-0ACEE8440A34} = {E8B3FB42-C450-4B12-9C2C-7B9A02B616BB}
{30A143AF-4E9D-457E-BDAE-DFBC5A262F4A} = {383995FF-B661-4E15-A830-640FC5BA8A1F}
{EEACDE24-9D4A-4F65-B13A-644E89A7918D} = {8A9DBB76-6618-4982-87D7-6CBD8375EB15}
{3C12BE69-247B-4448-9700-0ACEE8440A34} = {E8B3FB42-C450-4B12-9C2C-7B9A02B616BB}
{1221F32F-7310-49FF-94DD-2BCF570E03F2} = {EC7A08E9-3355-486B-BA30-41A1F8CAC5F5}
{9208B446-A7E0-4B5A-A42D-37E63B76E875} = {3C12BE69-247B-4448-9700-0ACEE8440A34}
{02591EE4-1033-4575-984F-7AB290E7C6FA} = {48853497-9C2D-4ADA-AED3-61280AF1418D}
{A5B30EEA-2DE1-4233-8584-936CB862191B} = {02591EE4-1033-4575-984F-7AB290E7C6FA}
{6E853D47-6C4F-4102-85A2-31EB172FB864} = {383995FF-B661-4E15-A830-640FC5BA8A1F}
{4B175C6B-F5BE-4B65-BFCC-A949CA5BC6A3} = {8A9DBB76-6618-4982-87D7-6CBD8375EB15}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {40383055-CC50-4600-AD9A-53C14F620D03}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) MASA Stack All rights reserved.
// Copyright (c) MASA Stack All rights reserved.
// Licensed under the MIT License. See LICENSE.txt in the project root for license information.

namespace Masa.BuildingBlocks.Isolation;
Expand Down Expand Up @@ -68,6 +68,7 @@ public DefaultIsolationConfigProvider(
GetMessage(),
componentConfigs.Count);
componentConfigInfo = componentConfigs.First();
_logger?.LogDebug("options is {Options}", componentConfigInfo);
}
else
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@

namespace Masa.BuildingBlocks.StackSdks.Auth.Contracts.Model;

public class GetThirdPartyUserModel
public class GetThirdPartyUserModel : IEnvironmentModel
{
public string ThridPartyIdentity { get; set; }

public ThirdPartyIdpTypes ThirdPartyIdpType { get; set; }

public string Environment { get; set; }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Copyright (c) MASA Stack All rights reserved.
// Licensed under the MIT License. See LICENSE.txt in the project root for license information.

namespace Masa.BuildingBlocks.StackSdks.Auth.Contracts.Model;

public interface IEnvironmentModel
{
public string Environment { get; set; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Masa.BuildingBlocks.StackSdks.Auth.Contracts.Model;

public class LoginByLdapModel
public class LoginByLdapModel : IEnvironmentModel
{
public string ClientId { get; set; } = "";

Expand All @@ -14,4 +14,6 @@ public class LoginByLdapModel
public string UserName { get; set; }

public string Scheme { get; set; } = "Ldap";

public string Environment { get; set; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,17 @@

namespace Masa.BuildingBlocks.StackSdks.Auth.Contracts.Model;

public class LoginByPasswordModel
public class LoginByPasswordModel : IEnvironmentModel
{
public string ClientId { get; set; } = "";

public string ClientSecret { get; set; } = "";

public List<string> Scope { get; set; } = new (){ "openid", "profile" };
public List<string> Scope { get; set; } = new() { "openid", "profile" };

public string Account { get; set; }

public string Password { get; set; }

public string Environment { get; set; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,17 @@

namespace Masa.BuildingBlocks.StackSdks.Auth.Contracts.Model;

public class LoginByPhoneNumberFromSsoModel
public class LoginByPhoneNumberFromSsoModel : IEnvironmentModel
{
public string ClientId { get; set; } = "";

public string ClientSecret { get; set; } = "";

public List<string> Scope { get; set; } = new (){ "openid", "profile" };
public List<string> Scope { get; set; } = new() { "openid", "profile" };

public string PhoneNumber { get; set; } = "";

public string Code { get; set; } = "";

public string Environment { get; set; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@

namespace Masa.BuildingBlocks.StackSdks.Auth.Contracts.Model;

public class LoginByPhoneNumberModel
public class LoginByPhoneNumberModel : IEnvironmentModel
{
public string PhoneNumber { get; set; } = "";

public string Code { get; set; } = "";

public bool RegisterLogin { get; set; }

public string Environment { get; set; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Masa.BuildingBlocks.StackSdks.Auth.Contracts.Model;

public class LoginByThirdPartyIdpModel
public class LoginByThirdPartyIdpModel : IEnvironmentModel
{
public string ClientId { get; set; } = "";

Expand All @@ -16,4 +16,6 @@ public class LoginByThirdPartyIdpModel
public string? Code { get; set; }

public string? IdToken { get; set; }

public string Environment { get; set; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Masa.BuildingBlocks.StackSdks.Auth.Contracts.Model;

public abstract class RegisterModel
public abstract class RegisterModel : IEnvironmentModel
{
public string? Account { get; set; }

Expand All @@ -16,4 +16,6 @@ public abstract class RegisterModel
public string? Name { get; set; }

public string? IdCard { get; set; }

public string Environment { get; set; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@

namespace Masa.BuildingBlocks.StackSdks.Auth.Contracts.Model;

public class SendEmailModel
public class SendEmailModel : IEnvironmentModel
{
public string Email { get; set; } = "";

public SendEmailTypes SendEmailType { get; set; } = SendEmailTypes.Undefined;

public string Environment { get; set; }

public SendEmailModel()
{
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@

namespace Masa.BuildingBlocks.StackSdks.Auth.Contracts.Model;

public class SendMsgCodeModel
public class SendMsgCodeModel : IEnvironmentModel
{
public Guid UserId { get; set; }

public string PhoneNumber { get; set; } = "";

public SendMsgCodeTypes SendMsgCodeType { get; set; } = SendMsgCodeTypes.VerifiyPhoneNumber;

public string Environment { get; set; }

public SendMsgCodeModel()
{
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// Copyright (c) MASA Stack All rights reserved.
// Licensed under the MIT License. See LICENSE.txt in the project root for license information.

namespace Masa.BuildingBlocks.StackSdks.Auth.Contracts.Model;

public class UserSelectModel
{
public Guid Id { get; set; }

public string? Name { get; set; }

public string DisplayName { get; set; }

public string Account { get; set; }

public string? PhoneNumber { get; set; }

public string? Email { get; set; }

public string Avatar { get; set; }

public UserSelectModel()
{
DisplayName = "";
Account = "";
Avatar = "";
}

public UserSelectModel(Guid id, string name, string displayName, string account, string phoneNumber, string email, string avatar)
{
Id = id;
Name = name;
DisplayName = displayName;
Account = account;
PhoneNumber = phoneNumber;
Email = email;
Avatar = avatar;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Copyright (c) MASA Stack All rights reserved.
// Licensed under the MIT License. See LICENSE.txt in the project root for license information.

namespace Masa.BuildingBlocks.StackSdks.Auth.Contracts.Model;

public class ValidateAccountModel : IEnvironmentModel
{
public string Account { get; set; }

public string Password { get; set; }

public bool LdapLogin { get; set; }

public string Environment { get; set; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public interface IUserService

Task<UserModel> UpsertAsync(UpsertUserModel user);

Task<UserModel?> ValidateCredentialsByAccountAsync(string account, string password, bool isLdap = false);
Task<UserModel?> ValidateAccountAsync(ValidateAccountModel validateAccountModel);

Task<UserModel?> GetByAccountAsync(string account);

Expand Down Expand Up @@ -101,6 +101,8 @@ public interface IUserService

Task RemoveAsync(Guid id);

Task<List<UserSelectModel>> SearchAsync(string search);

Task BindRolesAsync(BindUserRolesModel model);

Task UnbindRolesAsync(UnbindUserRolesModel model);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Copyright (c) MASA Stack All rights reserved.
// Licensed under the MIT License. See LICENSE.txt in the project root for license information.

global using Masa.BuildingBlocks.StackSdks.Config;
global using Masa.BuildingBlocks.StackSdks.Config.Models;
global using System.Security.Cryptography;
global using System.Text;
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Copyright (c) MASA Stack All rights reserved.
// Licensed under the MIT License. See LICENSE.txt in the project root for license information.

namespace Masa.BuildingBlocks.StackSdks.Isolation;

public class EnvironmentProvider
{
readonly List<string> _environments;

public EnvironmentProvider(List<string> environments)
{
_environments = environments;
}

public List<string> GetEnvionments()
{
return _environments;
}
}
Loading

0 comments on commit 3de695b

Please sign in to comment.