From 98e17766b203734a1817eed94338e2d25f4395f7 Mon Sep 17 00:00:00 2001 From: transtrike Date: Sat, 13 Feb 2021 16:20:18 +0200 Subject: Project Restructure P.1 --- src/Common/DevHive.Common.Models/DevHive.Common.csproj | 15 +++++++++++++++ src/Common/DevHive.Common.Models/Identity/TokenModel.cs | 12 ++++++++++++ src/Common/DevHive.Common.Models/Misc/IdModel.cs | 9 +++++++++ .../DevHive.Common.Models/Misc/PasswordModifications.cs | 13 +++++++++++++ src/Common/DevHive.Common.Models/Misc/Patch.cs | 9 +++++++++ 5 files changed, 58 insertions(+) create mode 100644 src/Common/DevHive.Common.Models/DevHive.Common.csproj create mode 100644 src/Common/DevHive.Common.Models/Identity/TokenModel.cs create mode 100644 src/Common/DevHive.Common.Models/Misc/IdModel.cs create mode 100644 src/Common/DevHive.Common.Models/Misc/PasswordModifications.cs create mode 100644 src/Common/DevHive.Common.Models/Misc/Patch.cs (limited to 'src/Common') diff --git a/src/Common/DevHive.Common.Models/DevHive.Common.csproj b/src/Common/DevHive.Common.Models/DevHive.Common.csproj new file mode 100644 index 0000000..ace4997 --- /dev/null +++ b/src/Common/DevHive.Common.Models/DevHive.Common.csproj @@ -0,0 +1,15 @@ + + + + net5.0 + + + + + + + + true + latest + + diff --git a/src/Common/DevHive.Common.Models/Identity/TokenModel.cs b/src/Common/DevHive.Common.Models/Identity/TokenModel.cs new file mode 100644 index 0000000..0fb6c82 --- /dev/null +++ b/src/Common/DevHive.Common.Models/Identity/TokenModel.cs @@ -0,0 +1,12 @@ +namespace DevHive.Common.Models.Identity +{ + public class TokenModel + { + public TokenModel(string token) + { + this.Token = token; + } + + public string Token { get; set; } + } +} \ No newline at end of file diff --git a/src/Common/DevHive.Common.Models/Misc/IdModel.cs b/src/Common/DevHive.Common.Models/Misc/IdModel.cs new file mode 100644 index 0000000..a5c7b65 --- /dev/null +++ b/src/Common/DevHive.Common.Models/Misc/IdModel.cs @@ -0,0 +1,9 @@ +using System; + +namespace DevHive.Common.Models.Misc +{ + public class IdModel + { + public Guid Id { get; set; } + } +} \ No newline at end of file diff --git a/src/Common/DevHive.Common.Models/Misc/PasswordModifications.cs b/src/Common/DevHive.Common.Models/Misc/PasswordModifications.cs new file mode 100644 index 0000000..f10a334 --- /dev/null +++ b/src/Common/DevHive.Common.Models/Misc/PasswordModifications.cs @@ -0,0 +1,13 @@ +using System.Security.Cryptography; +using System.Text; + +namespace DevHive.Common.Models.Misc +{ + public static class PasswordModifications + { + public static string GeneratePasswordHash(string password) + { + return string.Join(string.Empty, SHA512.HashData(Encoding.ASCII.GetBytes(password))); + } + } +} diff --git a/src/Common/DevHive.Common.Models/Misc/Patch.cs b/src/Common/DevHive.Common.Models/Misc/Patch.cs new file mode 100644 index 0000000..ea5a4f1 --- /dev/null +++ b/src/Common/DevHive.Common.Models/Misc/Patch.cs @@ -0,0 +1,9 @@ +namespace DevHive.Common.Models.Misc +{ + public class Patch + { + public string Name { get; set; } + public object Value { get; set; } + public string Action { get; set; } + } +} -- cgit v1.2.3