From 3a37a6d5244c5b47c20375d848e92c23fd6c9247 Mon Sep 17 00:00:00 2001 From: wzh425 Date: Sun, 7 Apr 2024 14:13:40 +0800 Subject: [PATCH] reactor : Supports PasswordType And ThirdPartyUserClaimData (#710) --- .../Enum/PasswordTypes.cs | 10 ++++++++++ .../Model/AddThirdPartyUserModel.cs | 2 ++ .../Model/AddUserModel.cs | 2 ++ .../Model/UpsertThirdPartyUserModel.cs | 2 ++ 4 files changed, 16 insertions(+) create mode 100644 src/BuildingBlocks/StackSdks/Auth/Masa.BuildingBlocks.StackSdks.Auth.Contracts/Enum/PasswordTypes.cs diff --git a/src/BuildingBlocks/StackSdks/Auth/Masa.BuildingBlocks.StackSdks.Auth.Contracts/Enum/PasswordTypes.cs b/src/BuildingBlocks/StackSdks/Auth/Masa.BuildingBlocks.StackSdks.Auth.Contracts/Enum/PasswordTypes.cs new file mode 100644 index 000000000..f5346c756 --- /dev/null +++ b/src/BuildingBlocks/StackSdks/Auth/Masa.BuildingBlocks.StackSdks.Auth.Contracts/Enum/PasswordTypes.cs @@ -0,0 +1,10 @@ +// 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.Enum; + +public enum PasswordTypes +{ + MD5 = 1, + HashPassword, +} diff --git a/src/BuildingBlocks/StackSdks/Auth/Masa.BuildingBlocks.StackSdks.Auth.Contracts/Model/AddThirdPartyUserModel.cs b/src/BuildingBlocks/StackSdks/Auth/Masa.BuildingBlocks.StackSdks.Auth.Contracts/Model/AddThirdPartyUserModel.cs index 51df1fe81..aa98c9b56 100644 --- a/src/BuildingBlocks/StackSdks/Auth/Masa.BuildingBlocks.StackSdks.Auth.Contracts/Model/AddThirdPartyUserModel.cs +++ b/src/BuildingBlocks/StackSdks/Auth/Masa.BuildingBlocks.StackSdks.Auth.Contracts/Model/AddThirdPartyUserModel.cs @@ -12,4 +12,6 @@ public class AddThirdPartyUserModel public string Scheme { get; set; } public AddUserModel User { get; set; } + + public Dictionary ClaimData { get; set; } = new(); } diff --git a/src/BuildingBlocks/StackSdks/Auth/Masa.BuildingBlocks.StackSdks.Auth.Contracts/Model/AddUserModel.cs b/src/BuildingBlocks/StackSdks/Auth/Masa.BuildingBlocks.StackSdks.Auth.Contracts/Model/AddUserModel.cs index 16d4cdafa..19d7c94dd 100644 --- a/src/BuildingBlocks/StackSdks/Auth/Masa.BuildingBlocks.StackSdks.Auth.Contracts/Model/AddUserModel.cs +++ b/src/BuildingBlocks/StackSdks/Auth/Masa.BuildingBlocks.StackSdks.Auth.Contracts/Model/AddUserModel.cs @@ -28,5 +28,7 @@ public class AddUserModel public string? Password { get; set; } public GenderTypes Gender { get; set; } + + public PasswordTypes PasswordType { get; set; } = PasswordTypes.MD5; } diff --git a/src/BuildingBlocks/StackSdks/Auth/Masa.BuildingBlocks.StackSdks.Auth.Contracts/Model/UpsertThirdPartyUserModel.cs b/src/BuildingBlocks/StackSdks/Auth/Masa.BuildingBlocks.StackSdks.Auth.Contracts/Model/UpsertThirdPartyUserModel.cs index 26a66ecb1..f70085239 100644 --- a/src/BuildingBlocks/StackSdks/Auth/Masa.BuildingBlocks.StackSdks.Auth.Contracts/Model/UpsertThirdPartyUserModel.cs +++ b/src/BuildingBlocks/StackSdks/Auth/Masa.BuildingBlocks.StackSdks.Auth.Contracts/Model/UpsertThirdPartyUserModel.cs @@ -10,4 +10,6 @@ public class UpsertThirdPartyUserModel : UpsertUserModel public object ExtendedData { get; set; } public string Scheme { get; set; } + + public Dictionary ClaimData { get; set; } = new(); }