├── VaultEdge.API
├── VaultEdge.API
│ ├── obj
│ │ ├── Debug
│ │ │ └── net9.0
│ │ │ │ ├── VaultEdg.B0CB2EB5.Up2Date
│ │ │ │ ├── VaultEdge.API.MvcApplicationPartsAssemblyInfo.cache
│ │ │ │ ├── staticwebassets.build.json.cache
│ │ │ │ ├── staticwebassets.build.endpoints.json
│ │ │ │ ├── VaultEdge.API.AssemblyInfoInputs.cache
│ │ │ │ ├── VaultEdge.API.genruntimeconfig.cache
│ │ │ │ ├── VaultEdge.API.csproj.CoreCompileInputs.cache
│ │ │ │ ├── apphost.exe
│ │ │ │ ├── VaultEdge.API.dll
│ │ │ │ ├── VaultEdge.API.pdb
│ │ │ │ ├── ref
│ │ │ │ └── VaultEdge.API.dll
│ │ │ │ ├── VaultEdge.API.assets.cache
│ │ │ │ ├── refint
│ │ │ │ └── VaultEdge.API.dll
│ │ │ │ ├── VaultEdge.API.csproj.AssemblyReference.cache
│ │ │ │ ├── .NETCoreApp,Version=v9.0.AssemblyAttributes.cs
│ │ │ │ ├── staticwebassets.build.json
│ │ │ │ ├── rpswa.dswa.cache.json
│ │ │ │ ├── rjsmcshtml.dswa.cache.json
│ │ │ │ ├── rjsmrazor.dswa.cache.json
│ │ │ │ ├── VaultEdge.API.MvcApplicationPartsAssemblyInfo.cs
│ │ │ │ ├── VaultEdge.API.GlobalUsings.g.cs
│ │ │ │ ├── VaultEdge.API.AssemblyInfo.cs
│ │ │ │ ├── VaultEdge.API.GeneratedMSBuildEditorConfig.editorconfig
│ │ │ │ └── VaultEdge.API.csproj.FileListAbsolute.txt
│ │ ├── VaultEdge.API.csproj.nuget.g.targets
│ │ ├── project.nuget.cache
│ │ ├── VaultEdge.API.csproj.nuget.g.props
│ │ ├── VaultEdge.API.csproj.nuget.dgspec.json
│ │ └── project.assets.json
│ ├── bin
│ │ └── Debug
│ │ │ └── net9.0
│ │ │ ├── VaultEdge.API.staticwebassets.endpoints.json
│ │ │ ├── VaultEdge.API.dll
│ │ │ ├── VaultEdge.API.exe
│ │ │ ├── VaultEdge.API.pdb
│ │ │ ├── Microsoft.OpenApi.dll
│ │ │ ├── Microsoft.AspNetCore.OpenApi.dll
│ │ │ ├── appsettings.Development.json
│ │ │ ├── appsettings.json
│ │ │ ├── VaultEdge.API.runtimeconfig.json
│ │ │ └── VaultEdge.API.deps.json
│ ├── VaultEdge.API.http
│ ├── appsettings.Development.json
│ ├── appsettings.json
│ ├── VaultEdge.API.csproj
│ ├── Properties
│ │ └── launchSettings.json
│ └── Program.cs
├── Program.cs
├── Controllers
│ ├── UserController.cs
│ ├── VaultController.cs
│ └── AuthController.cs
└── Startup.cs
├── VaultEdge.Docs
├── VaultEdge_Logo.png
├── README.md
└── API_Structure.md
├── VaultEdge.Core
├── Interfaces
│ ├── ITokenService.cs
│ ├── IVaultService.cs
│ └── IUserService.cs
├── Models
│ ├── AuthResult.cs
│ ├── VaultItem.cs
│ └── User.cs
└── Services
│ ├── TokenService.cs
│ ├── VaultService.cs
│ └── UserService.cs
├── VaultEdge.Common
├── Constants.cs
├── ResultWrapper.cs
└── Extensions.cs
├── VaultEdge.Security
├── PasswordHasher.cs
├── TokenValidator.cs
└── JwtTokenGenerator.cs
├── VaultEdge.Data
├── VaultDbContext.cs
└── Repositories
│ ├── GenericRepository.cs
│ ├── VaultRepository.cs
│ └── UserRepository.cs
├── VaultEdge.Tests
├── AuthTests.cs
├── UserTests.cs
└── VaultTests.cs
├── README.md
└── LICENSE
/VaultEdge.API/VaultEdge.API/obj/Debug/net9.0/VaultEdg.B0CB2EB5.Up2Date:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/VaultEdge.API/VaultEdge.API/obj/Debug/net9.0/VaultEdge.API.MvcApplicationPartsAssemblyInfo.cache:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/VaultEdge.API/VaultEdge.API/obj/Debug/net9.0/staticwebassets.build.json.cache:
--------------------------------------------------------------------------------
1 | XtvzQyWors7c0LFDNX+AzNAo+6xhlCCpqEyVx9aPa2k=
--------------------------------------------------------------------------------
/VaultEdge.Docs/VaultEdge_Logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MuradIsazade777/VaultEdge/HEAD/VaultEdge.Docs/VaultEdge_Logo.png
--------------------------------------------------------------------------------
/VaultEdge.API/VaultEdge.API/obj/Debug/net9.0/staticwebassets.build.endpoints.json:
--------------------------------------------------------------------------------
1 | {"Version":1,"ManifestType":"Build","Endpoints":[]}
--------------------------------------------------------------------------------
/VaultEdge.API/VaultEdge.API/bin/Debug/net9.0/VaultEdge.API.staticwebassets.endpoints.json:
--------------------------------------------------------------------------------
1 | {"Version":1,"ManifestType":"Build","Endpoints":[]}
--------------------------------------------------------------------------------
/VaultEdge.API/VaultEdge.API/obj/Debug/net9.0/VaultEdge.API.AssemblyInfoInputs.cache:
--------------------------------------------------------------------------------
1 | f0b279b7b880d05829a1c01a059eb6d59c982105810111d911a030c8b331bd17
2 |
--------------------------------------------------------------------------------
/VaultEdge.API/VaultEdge.API/obj/Debug/net9.0/VaultEdge.API.genruntimeconfig.cache:
--------------------------------------------------------------------------------
1 | 84409aef761ffc79bff4dda7c2be5ffb7abce21ebcdf8e9b011ce54639e37d1d
2 |
--------------------------------------------------------------------------------
/VaultEdge.API/VaultEdge.API/obj/Debug/net9.0/VaultEdge.API.csproj.CoreCompileInputs.cache:
--------------------------------------------------------------------------------
1 | 8eec047a6e1f259784ed72e689b0ba8149e297747031628f12a461c855474ff3
2 |
--------------------------------------------------------------------------------
/VaultEdge.API/VaultEdge.API/obj/Debug/net9.0/apphost.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MuradIsazade777/VaultEdge/HEAD/VaultEdge.API/VaultEdge.API/obj/Debug/net9.0/apphost.exe
--------------------------------------------------------------------------------
/VaultEdge.API/VaultEdge.API/bin/Debug/net9.0/VaultEdge.API.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MuradIsazade777/VaultEdge/HEAD/VaultEdge.API/VaultEdge.API/bin/Debug/net9.0/VaultEdge.API.dll
--------------------------------------------------------------------------------
/VaultEdge.API/VaultEdge.API/bin/Debug/net9.0/VaultEdge.API.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MuradIsazade777/VaultEdge/HEAD/VaultEdge.API/VaultEdge.API/bin/Debug/net9.0/VaultEdge.API.exe
--------------------------------------------------------------------------------
/VaultEdge.API/VaultEdge.API/bin/Debug/net9.0/VaultEdge.API.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MuradIsazade777/VaultEdge/HEAD/VaultEdge.API/VaultEdge.API/bin/Debug/net9.0/VaultEdge.API.pdb
--------------------------------------------------------------------------------
/VaultEdge.API/VaultEdge.API/obj/Debug/net9.0/VaultEdge.API.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MuradIsazade777/VaultEdge/HEAD/VaultEdge.API/VaultEdge.API/obj/Debug/net9.0/VaultEdge.API.dll
--------------------------------------------------------------------------------
/VaultEdge.API/VaultEdge.API/obj/Debug/net9.0/VaultEdge.API.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MuradIsazade777/VaultEdge/HEAD/VaultEdge.API/VaultEdge.API/obj/Debug/net9.0/VaultEdge.API.pdb
--------------------------------------------------------------------------------
/VaultEdge.API/VaultEdge.API/bin/Debug/net9.0/Microsoft.OpenApi.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MuradIsazade777/VaultEdge/HEAD/VaultEdge.API/VaultEdge.API/bin/Debug/net9.0/Microsoft.OpenApi.dll
--------------------------------------------------------------------------------
/VaultEdge.API/VaultEdge.API/obj/Debug/net9.0/ref/VaultEdge.API.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MuradIsazade777/VaultEdge/HEAD/VaultEdge.API/VaultEdge.API/obj/Debug/net9.0/ref/VaultEdge.API.dll
--------------------------------------------------------------------------------
/VaultEdge.API/VaultEdge.API/VaultEdge.API.http:
--------------------------------------------------------------------------------
1 | @VaultEdge.API_HostAddress = http://localhost:5289
2 |
3 | GET {{VaultEdge.API_HostAddress}}/weatherforecast/
4 | Accept: application/json
5 |
6 | ###
7 |
--------------------------------------------------------------------------------
/VaultEdge.API/VaultEdge.API/obj/Debug/net9.0/VaultEdge.API.assets.cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MuradIsazade777/VaultEdge/HEAD/VaultEdge.API/VaultEdge.API/obj/Debug/net9.0/VaultEdge.API.assets.cache
--------------------------------------------------------------------------------
/VaultEdge.API/VaultEdge.API/obj/Debug/net9.0/refint/VaultEdge.API.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MuradIsazade777/VaultEdge/HEAD/VaultEdge.API/VaultEdge.API/obj/Debug/net9.0/refint/VaultEdge.API.dll
--------------------------------------------------------------------------------
/VaultEdge.API/VaultEdge.API/appsettings.Development.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "LogLevel": {
4 | "Default": "Information",
5 | "Microsoft.AspNetCore": "Warning"
6 | }
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/VaultEdge.API/VaultEdge.API/bin/Debug/net9.0/Microsoft.AspNetCore.OpenApi.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MuradIsazade777/VaultEdge/HEAD/VaultEdge.API/VaultEdge.API/bin/Debug/net9.0/Microsoft.AspNetCore.OpenApi.dll
--------------------------------------------------------------------------------
/VaultEdge.API/VaultEdge.API/obj/VaultEdge.API.csproj.nuget.g.targets:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/VaultEdge.API/VaultEdge.API/bin/Debug/net9.0/appsettings.Development.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "LogLevel": {
4 | "Default": "Information",
5 | "Microsoft.AspNetCore": "Warning"
6 | }
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/VaultEdge.API/VaultEdge.API/appsettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "LogLevel": {
4 | "Default": "Information",
5 | "Microsoft.AspNetCore": "Warning"
6 | }
7 | },
8 | "AllowedHosts": "*"
9 | }
10 |
--------------------------------------------------------------------------------
/VaultEdge.API/VaultEdge.API/obj/Debug/net9.0/VaultEdge.API.csproj.AssemblyReference.cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/MuradIsazade777/VaultEdge/HEAD/VaultEdge.API/VaultEdge.API/obj/Debug/net9.0/VaultEdge.API.csproj.AssemblyReference.cache
--------------------------------------------------------------------------------
/VaultEdge.API/VaultEdge.API/bin/Debug/net9.0/appsettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "LogLevel": {
4 | "Default": "Information",
5 | "Microsoft.AspNetCore": "Warning"
6 | }
7 | },
8 | "AllowedHosts": "*"
9 | }
10 |
--------------------------------------------------------------------------------
/VaultEdge.Core/Interfaces/ITokenService.cs:
--------------------------------------------------------------------------------
1 | using VaultEdge.Core.Models;
2 |
3 | namespace VaultEdge.Core.Interfaces
4 | {
5 | public interface ITokenService
6 | {
7 | string GenerateToken(User user);
8 | string RefreshToken(string oldToken);
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/VaultEdge.API/VaultEdge.API/obj/Debug/net9.0/.NETCoreApp,Version=v9.0.AssemblyAttributes.cs:
--------------------------------------------------------------------------------
1 | //
2 | using System;
3 | using System.Reflection;
4 | [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v9.0", FrameworkDisplayName = ".NET 9.0")]
5 |
--------------------------------------------------------------------------------
/VaultEdge.API/VaultEdge.API/obj/Debug/net9.0/staticwebassets.build.json:
--------------------------------------------------------------------------------
1 | {"Version":1,"Hash":"XtvzQyWors7c0LFDNX+AzNAo+6xhlCCpqEyVx9aPa2k=","Source":"VaultEdge.API","BasePath":"_content/VaultEdge.API","Mode":"Default","ManifestType":"Build","ReferencedProjectsConfiguration":[],"DiscoveryPatterns":[],"Assets":[],"Endpoints":[]}
--------------------------------------------------------------------------------
/VaultEdge.Core/Models/AuthResult.cs:
--------------------------------------------------------------------------------
1 | namespace VaultEdge.Core.Models
2 | {
3 | public class AuthResult
4 | {
5 | public string Token { get; set; }
6 | public bool Success { get; set; } = true;
7 | public string Message { get; set; }
8 | }
9 |
10 | public class TokenRefreshRequest
11 | {
12 | public string Token { get; set; }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/VaultEdge.API/VaultEdge.API/VaultEdge.API.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net9.0
5 | enable
6 | enable
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/VaultEdge.Core/Interfaces/IVaultService.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using VaultEdge.Core.Models;
3 |
4 | namespace VaultEdge.Core.Interfaces
5 | {
6 | public interface IVaultService
7 | {
8 | IEnumerable GetItems(string userId);
9 | VaultItem AddItem(VaultItem item);
10 | VaultItem UpdateItem(string id, VaultItem item);
11 | bool DeleteItem(string id);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/VaultEdge.API/VaultEdge.API/obj/Debug/net9.0/rpswa.dswa.cache.json:
--------------------------------------------------------------------------------
1 | {"GlobalPropertiesHash":"b6Is3u9ff23eR79VA7VfuKaX6FAbgVtASwq4AA1H8Iw=","FingerprintPatternsHash":"gq3WsqcKBUGTSNle7RKKyXRIwh7M8ccEqOqYvIzoM04=","PropertyOverridesHash":"8ZRc1sGeVrPBx4lD717BgRaQekyh78QKV9SKsdt638U=","InputHashes":["PeFf\u002BDolQ2O2xNS\u002By\u002BuZmzKyUPx6j7XBqdEJc0eBrIo=","KZesdpYi3DkeZqb0Ev7hdLLz1QAMDuzGb\u002Bu6U2S2Sew="],"CachedAssets":{},"CachedCopyCandidates":{}}
--------------------------------------------------------------------------------
/VaultEdge.Core/Interfaces/IUserService.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using VaultEdge.Core.Models;
3 |
4 | namespace VaultEdge.Core.Interfaces
5 | {
6 | public interface IUserService
7 | {
8 | AuthResult CreateUser(UserRegisterRequest request);
9 | User ValidateUser(string username, string password);
10 | User GetUserById(string id);
11 | IEnumerable GetAllUsers();
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/VaultEdge.Core/Models/VaultItem.cs:
--------------------------------------------------------------------------------
1 | namespace VaultEdge.Core.Models
2 | {
3 | public class VaultItem
4 | {
5 | public string Id { get; set; } = Guid.NewGuid().ToString();
6 | public string UserId { get; set; }
7 | public string Title { get; set; }
8 | public string Content { get; set; }
9 | public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
10 | public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/VaultEdge.Common/Constants.cs:
--------------------------------------------------------------------------------
1 | namespace VaultEdge.Common
2 | {
3 | public static class Constants
4 | {
5 | public const string DefaultUserRole = "User";
6 | public const string AdminRole = "Admin";
7 | public const int TokenExpiryHours = 2;
8 | public const string JwtSecretKey = "VaultEdgeSuperSecretKey123!";
9 | public const string CorsPolicyName = "AllowAll";
10 | public const string VaultDbName = "VaultEdgeDB";
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/VaultEdge.API/VaultEdge.API/bin/Debug/net9.0/VaultEdge.API.runtimeconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "runtimeOptions": {
3 | "tfm": "net9.0",
4 | "frameworks": [
5 | {
6 | "name": "Microsoft.NETCore.App",
7 | "version": "9.0.0"
8 | },
9 | {
10 | "name": "Microsoft.AspNetCore.App",
11 | "version": "9.0.0"
12 | }
13 | ],
14 | "configProperties": {
15 | "System.GC.Server": true,
16 | "System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false
17 | }
18 | }
19 | }
--------------------------------------------------------------------------------
/VaultEdge.API/VaultEdge.API/obj/project.nuget.cache:
--------------------------------------------------------------------------------
1 | {
2 | "version": 2,
3 | "dgSpecHash": "nvCbYIQD3SM=",
4 | "success": true,
5 | "projectFilePath": "C:\\Users\\HP\\OneDrive\\Desktop\\VaultEdge\\VaultEdge.API\\VaultEdge.API\\VaultEdge.API.csproj",
6 | "expectedPackageFiles": [
7 | "C:\\Users\\HP\\.nuget\\packages\\microsoft.aspnetcore.openapi\\9.0.8\\microsoft.aspnetcore.openapi.9.0.8.nupkg.sha512",
8 | "C:\\Users\\HP\\.nuget\\packages\\microsoft.openapi\\1.6.17\\microsoft.openapi.1.6.17.nupkg.sha512"
9 | ],
10 | "logs": []
11 | }
--------------------------------------------------------------------------------
/VaultEdge.API/VaultEdge.API/obj/Debug/net9.0/rjsmcshtml.dswa.cache.json:
--------------------------------------------------------------------------------
1 | {"GlobalPropertiesHash":"8EYIEAEl6W5WLRgWbSAhkXZ26lUJt5+lotPCu1A4+4Y=","FingerprintPatternsHash":"8ZRc1sGeVrPBx4lD717BgRaQekyh78QKV9SKsdt638U=","PropertyOverridesHash":"8ZRc1sGeVrPBx4lD717BgRaQekyh78QKV9SKsdt638U=","InputHashes":["PeFf\u002BDolQ2O2xNS\u002By\u002BuZmzKyUPx6j7XBqdEJc0eBrIo=","KZesdpYi3DkeZqb0Ev7hdLLz1QAMDuzGb\u002Bu6U2S2Sew=","PA4UlNuq4AfwbFpE2P2w06RaoupdBhXJO8Ey\u002BkX8Tss=","a6Zmj9FOgRBATIcCMI8ZrWicc2ixlYBb/\u002Bc5CFLXrxc=","yzcNIQPmvaMgvUgFbDHiUABJLzFLWao/c9c2Wpl\u002B3dQ="],"CachedAssets":{},"CachedCopyCandidates":{}}
--------------------------------------------------------------------------------
/VaultEdge.API/VaultEdge.API/obj/Debug/net9.0/rjsmrazor.dswa.cache.json:
--------------------------------------------------------------------------------
1 | {"GlobalPropertiesHash":"3M6/Ek9qaKklNwahg8Prr5kbOhgLJJdN7fDQZA7Kaaw=","FingerprintPatternsHash":"8ZRc1sGeVrPBx4lD717BgRaQekyh78QKV9SKsdt638U=","PropertyOverridesHash":"8ZRc1sGeVrPBx4lD717BgRaQekyh78QKV9SKsdt638U=","InputHashes":["PeFf\u002BDolQ2O2xNS\u002By\u002BuZmzKyUPx6j7XBqdEJc0eBrIo=","KZesdpYi3DkeZqb0Ev7hdLLz1QAMDuzGb\u002Bu6U2S2Sew=","PA4UlNuq4AfwbFpE2P2w06RaoupdBhXJO8Ey\u002BkX8Tss=","a6Zmj9FOgRBATIcCMI8ZrWicc2ixlYBb/\u002Bc5CFLXrxc=","yzcNIQPmvaMgvUgFbDHiUABJLzFLWao/c9c2Wpl\u002B3dQ="],"CachedAssets":{},"CachedCopyCandidates":{}}
--------------------------------------------------------------------------------
/VaultEdge.Core/Services/TokenService.cs:
--------------------------------------------------------------------------------
1 | using VaultEdge.Core.Interfaces;
2 | using VaultEdge.Core.Models;
3 |
4 | namespace VaultEdge.Core.Services
5 | {
6 | public class TokenService : ITokenService
7 | {
8 | public string GenerateToken(User user)
9 | {
10 | return $"token-{user.Id}-{DateTime.UtcNow.Ticks}";
11 | }
12 |
13 | public string RefreshToken(string oldToken)
14 | {
15 | if (string.IsNullOrEmpty(oldToken)) return null;
16 | return $"refreshed-{DateTime.UtcNow.Ticks}";
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/VaultEdge.API/Program.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.AspNetCore.Hosting;
2 | using Microsoft.Extensions.Hosting;
3 |
4 | namespace VaultEdge.API
5 | {
6 | public class Program
7 | {
8 | public static void Main(string[] args)
9 | {
10 | CreateHostBuilder(args).Build().Run();
11 | }
12 |
13 | public static IHostBuilder CreateHostBuilder(string[] args) =>
14 | Host.CreateDefaultBuilder(args)
15 | .ConfigureWebHostDefaults(webBuilder =>
16 | {
17 | webBuilder.UseStartup();
18 | });
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/VaultEdge.Common/ResultWrapper.cs:
--------------------------------------------------------------------------------
1 | namespace VaultEdge.Common
2 | {
3 | public class ResultWrapper
4 | {
5 | public bool Success { get; set; } = true;
6 | public string Message { get; set; } = "OK";
7 | public T Data { get; set; }
8 |
9 | public static ResultWrapper Ok(T data, string message = "OK")
10 | {
11 | return new ResultWrapper { Data = data, Message = message };
12 | }
13 |
14 | public static ResultWrapper Fail(string message)
15 | {
16 | return new ResultWrapper { Success = false, Message = message };
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/VaultEdge.Security/PasswordHasher.cs:
--------------------------------------------------------------------------------
1 | using System.Security.Cryptography;
2 | using System.Text;
3 |
4 | namespace VaultEdge.Security
5 | {
6 | public class PasswordHasher
7 | {
8 | public string Hash(string password)
9 | {
10 | using var sha256 = SHA256.Create();
11 | var bytes = Encoding.UTF8.GetBytes(password);
12 | var hash = sha256.ComputeHash(bytes);
13 | return Convert.ToBase64String(hash);
14 | }
15 |
16 | public bool Verify(string password, string hash)
17 | {
18 | var hashedInput = Hash(password);
19 | return hashedInput == hash;
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/VaultEdge.API/VaultEdge.API/obj/Debug/net9.0/VaultEdge.API.MvcApplicationPartsAssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | //
5 | // Changes to this file may cause incorrect behavior and will be lost if
6 | // the code is regenerated.
7 | //
8 | //------------------------------------------------------------------------------
9 |
10 | using System;
11 | using System.Reflection;
12 |
13 | [assembly: Microsoft.AspNetCore.Mvc.ApplicationParts.ApplicationPartAttribute("Microsoft.AspNetCore.OpenApi")]
14 |
15 | // Generated by the MSBuild WriteCodeFragment class.
16 |
17 |
--------------------------------------------------------------------------------
/VaultEdge.Common/Extensions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace VaultEdge.Common
4 | {
5 | public static class Extensions
6 | {
7 | public static string ToSafeString(this object obj)
8 | {
9 | return obj?.ToString() ?? string.Empty;
10 | }
11 |
12 | public static bool IsNullOrEmpty(this string str)
13 | {
14 | return string.IsNullOrWhiteSpace(str);
15 | }
16 |
17 | public static DateTime ToUtc(this DateTime dt)
18 | {
19 | return DateTime.SpecifyKind(dt, DateTimeKind.Utc);
20 | }
21 |
22 | public static string ShortId(this Guid guid)
23 | {
24 | return guid.ToString().Substring(0, 8);
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/VaultEdge.API/VaultEdge.API/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://json.schemastore.org/launchsettings.json",
3 | "profiles": {
4 | "http": {
5 | "commandName": "Project",
6 | "dotnetRunMessages": true,
7 | "launchBrowser": false,
8 | "applicationUrl": "http://localhost:5289",
9 | "environmentVariables": {
10 | "ASPNETCORE_ENVIRONMENT": "Development"
11 | }
12 | },
13 | "https": {
14 | "commandName": "Project",
15 | "dotnetRunMessages": true,
16 | "launchBrowser": false,
17 | "applicationUrl": "https://localhost:7170;http://localhost:5289",
18 | "environmentVariables": {
19 | "ASPNETCORE_ENVIRONMENT": "Development"
20 | }
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/VaultEdge.Core/Models/User.cs:
--------------------------------------------------------------------------------
1 | namespace VaultEdge.Core.Models
2 | {
3 | public class User
4 | {
5 | public string Id { get; set; } = Guid.NewGuid().ToString();
6 | public string Username { get; set; }
7 | public string PasswordHash { get; set; }
8 | public string Email { get; set; }
9 | public string Role { get; set; } = "User";
10 | }
11 |
12 | public class UserLoginRequest
13 | {
14 | public string Username { get; set; }
15 | public string Password { get; set; }
16 | }
17 |
18 | public class UserRegisterRequest
19 | {
20 | public string Username { get; set; }
21 | public string Password { get; set; }
22 | public string Email { get; set; }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/VaultEdge.API/VaultEdge.API/obj/Debug/net9.0/VaultEdge.API.GlobalUsings.g.cs:
--------------------------------------------------------------------------------
1 | //
2 | global using global::Microsoft.AspNetCore.Builder;
3 | global using global::Microsoft.AspNetCore.Hosting;
4 | global using global::Microsoft.AspNetCore.Http;
5 | global using global::Microsoft.AspNetCore.Routing;
6 | global using global::Microsoft.Extensions.Configuration;
7 | global using global::Microsoft.Extensions.DependencyInjection;
8 | global using global::Microsoft.Extensions.Hosting;
9 | global using global::Microsoft.Extensions.Logging;
10 | global using global::System;
11 | global using global::System.Collections.Generic;
12 | global using global::System.IO;
13 | global using global::System.Linq;
14 | global using global::System.Net.Http;
15 | global using global::System.Net.Http.Json;
16 | global using global::System.Threading;
17 | global using global::System.Threading.Tasks;
18 |
--------------------------------------------------------------------------------
/VaultEdge.Data/VaultDbContext.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.EntityFrameworkCore;
2 | using VaultEdge.Core.Models;
3 |
4 | namespace VaultEdge.Data
5 | {
6 | public class VaultDbContext : DbContext
7 | {
8 | public VaultDbContext(DbContextOptions options) : base(options) { }
9 |
10 | public DbSet Users { get; set; }
11 | public DbSet VaultItems { get; set; }
12 |
13 | protected override void OnModelCreating(ModelBuilder modelBuilder)
14 | {
15 | modelBuilder.Entity().HasKey(u => u.Id);
16 | modelBuilder.Entity().HasIndex(u => u.Username).IsUnique();
17 |
18 | modelBuilder.Entity().HasKey(v => v.Id);
19 | modelBuilder.Entity()
20 | .HasOne()
21 | .WithMany()
22 | .HasForeignKey(v => v.UserId);
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/VaultEdge.Docs/README.md:
--------------------------------------------------------------------------------
1 | # 🛡️ VaultEdge
2 |
3 | VaultEdge is a secure, modular, and scalable C# backend system. The project is fully functional with authentication, vault data storage, JWT token management, and a RESTful API interface.
4 |
5 | ## 🚀 Features
6 |
7 | - 🔐 JWT-based authentication
8 | - 🗄️ Vault CRUD operations
9 | - 👥 User management
10 | - 🧩 Modular service and repository structure
11 | - 🧪 Stability testing with xUnit tests
12 | - 🌐 API documentation with Swagger
13 | - 🎨 Branded logo and documentation
14 |
15 | ## 📁 Project Structure
16 |
17 | VaultEdge/ ├── VaultEdge.API/ ├── VaultEdge.Core/ ├── VaultEdge.Data/ ├── VaultEdge.Security/ ├── VaultEdge.Common/ ├── VaultEdge.Tests/ └── VaultEdge.Docs/
18 |
19 | Code
20 |
21 | ## 🧪 Tests
22 |
23 | ```bash
24 | dotnet test VaultEdge.Tests
25 | ▶️ Start
26 | bash
27 | dotnet run --project VaultEdge.API
28 | 📜 License
29 | MIT License © 2025 Murad Isazade
--------------------------------------------------------------------------------
/VaultEdge.API/Controllers/UserController.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.AspNetCore.Mvc;
2 | using VaultEdge.Core.Interfaces;
3 |
4 | namespace VaultEdge.API.Controllers
5 | {
6 | [ApiController]
7 | [Route("api/[controller]")]
8 | public class UserController : ControllerBase
9 | {
10 | private readonly IUserService _userService;
11 |
12 | public UserController(IUserService userService)
13 | {
14 | _userService = userService;
15 | }
16 |
17 | [HttpGet("{id}")]
18 | public IActionResult GetUserById(string id)
19 | {
20 | var user = _userService.GetUserById(id);
21 | if (user == null)
22 | return NotFound();
23 |
24 | return Ok(user);
25 | }
26 |
27 | [HttpGet]
28 | public IActionResult GetAllUsers()
29 | {
30 | var users = _userService.GetAllUsers();
31 | return Ok(users);
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/VaultEdge.Tests/AuthTests.cs:
--------------------------------------------------------------------------------
1 | using Xunit;
2 | using VaultEdge.Core.Services;
3 | using VaultEdge.Core.Models;
4 |
5 | namespace VaultEdge.Tests
6 | {
7 | public class AuthTests
8 | {
9 | [Fact]
10 | public void Should_Create_User_And_Generate_Token()
11 | {
12 | var userService = new UserService();
13 | var tokenService = new TokenService();
14 |
15 | var request = new UserRegisterRequest
16 | {
17 | Username = "murad",
18 | Password = "secure123",
19 | Email = "murad@example.com"
20 | };
21 |
22 | var result = userService.CreateUser(request);
23 | Assert.True(result.Success);
24 |
25 | var user = userService.ValidateUser("murad", "secure123");
26 | Assert.NotNull(user);
27 |
28 | var token = tokenService.GenerateToken(user);
29 | Assert.NotNull(token);
30 | Assert.Contains("token-", token);
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # 🛡️ VaultEdge
2 |
3 | **VaultEdge** is a secure, modular, and scalable backend system built with C#. It provides robust user authentication, encrypted vault storage, and a clean RESTful API architecture. Designed for developers who value clarity, extensibility, and performance.
4 |
5 | ## 🚀 Features
6 |
7 | - 🔐 JWT-based authentication and token lifecycle
8 | - 🗄️ Vault item CRUD operations
9 | - 👥 User management and role support
10 | - 🧩 Modular service and repository architecture
11 | - 🧪 Unit and integration tests with xUnit
12 | - 🌐 Swagger-powered API documentation
13 | - 🎨 Branded logo and documentation assets
14 |
15 | ## ▶️ Getting Started
16 |
17 | ```bash
18 | cd VaultEdge.API
19 | dotnet run
20 | Visit Swagger UI at:
21 |
22 | Code
23 | http://localhost:5289/swagger
24 | 🧪 Running Tests
25 | bash
26 | cd VaultEdge.Tests
27 | dotnet test
28 | ```
29 |
30 | 📷 Logo
31 | 
32 |
33 | 📜 License
34 | This project is licensed under the MIT License. See LICENSE for details.
35 |
--------------------------------------------------------------------------------
/VaultEdge.API/VaultEdge.API/obj/Debug/net9.0/VaultEdge.API.AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | //
5 | // Changes to this file may cause incorrect behavior and will be lost if
6 | // the code is regenerated.
7 | //
8 | //------------------------------------------------------------------------------
9 |
10 | using System;
11 | using System.Reflection;
12 |
13 | [assembly: System.Reflection.AssemblyCompanyAttribute("VaultEdge.API")]
14 | [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
15 | [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
16 | [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
17 | [assembly: System.Reflection.AssemblyProductAttribute("VaultEdge.API")]
18 | [assembly: System.Reflection.AssemblyTitleAttribute("VaultEdge.API")]
19 | [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
20 |
21 | // Generated by the MSBuild WriteCodeFragment class.
22 |
23 |
--------------------------------------------------------------------------------
/VaultEdge.Security/TokenValidator.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IdentityModel.Tokens.Jwt;
3 | using System.Text;
4 | using Microsoft.IdentityModel.Tokens;
5 |
6 | namespace VaultEdge.Security
7 | {
8 | public class TokenValidator
9 | {
10 | private readonly string _secretKey = "VaultEdgeSuperSecretKey123!";
11 |
12 | public bool IsValid(string token)
13 | {
14 | var tokenHandler = new JwtSecurityTokenHandler();
15 | var key = Encoding.ASCII.GetBytes(_secretKey);
16 |
17 | try
18 | {
19 | tokenHandler.ValidateToken(token, new TokenValidationParameters
20 | {
21 | ValidateIssuerSigningKey = true,
22 | IssuerSigningKey = new SymmetricSecurityKey(key),
23 | ValidateIssuer = false,
24 | ValidateAudience = false,
25 | ClockSkew = TimeSpan.Zero
26 | }, out _);
27 |
28 | return true;
29 | }
30 | catch
31 | {
32 | return false;
33 | }
34 | }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/VaultEdge.Data/Repositories/GenericRepository.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using Microsoft.EntityFrameworkCore;
5 |
6 | namespace VaultEdge.Data.Repositories
7 | {
8 | public class GenericRepository where T : class
9 | {
10 | private readonly VaultDbContext _context;
11 | private readonly DbSet _dbSet;
12 |
13 | public GenericRepository(VaultDbContext context)
14 | {
15 | _context = context;
16 | _dbSet = context.Set();
17 | }
18 |
19 | public IEnumerable GetAll() => _dbSet.ToList();
20 |
21 | public T GetById(string id) => _dbSet.Find(id);
22 |
23 | public void Add(T entity)
24 | {
25 | _dbSet.Add(entity);
26 | _context.SaveChanges();
27 | }
28 |
29 | public void Update(T entity)
30 | {
31 | _dbSet.Update(entity);
32 | _context.SaveChanges();
33 | }
34 |
35 | public void Delete(T entity)
36 | {
37 | _dbSet.Remove(entity);
38 | _context.SaveChanges();
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/VaultEdge.API/VaultEdge.API/obj/VaultEdge.API.csproj.nuget.g.props:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | True
5 | NuGet
6 | $(MSBuildThisFileDirectory)project.assets.json
7 | $(UserProfile)\.nuget\packages\
8 | C:\Users\HP\.nuget\packages\
9 | PackageReference
10 | 6.14.0
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | ---
2 |
3 | ## 📄 `LICENSE` (MIT License)
4 |
5 | ```text
6 | MIT License
7 |
8 | Copyright (c) 2025 Murad Isazade
9 |
10 | Permission is hereby granted, free of charge, to any person obtaining a copy
11 | of this software and associated documentation files (the "Software"), to deal
12 | in the Software without restriction, including without limitation the rights
13 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14 | copies of the Software, and to permit persons to whom the Software is
15 | furnished to do so, subject to the following conditions:
16 |
17 | The above copyright notice and this permission notice shall be included in all
18 | copies or substantial portions of the Software.
19 |
20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26 | SOFTWARE.
27 |
--------------------------------------------------------------------------------
/VaultEdge.API/VaultEdge.API/obj/Debug/net9.0/VaultEdge.API.GeneratedMSBuildEditorConfig.editorconfig:
--------------------------------------------------------------------------------
1 | is_global = true
2 | build_property.TargetFramework = net9.0
3 | build_property.TargetPlatformMinVersion =
4 | build_property.UsingMicrosoftNETSdkWeb = true
5 | build_property.ProjectTypeGuids =
6 | build_property.InvariantGlobalization =
7 | build_property.PlatformNeutralAssembly =
8 | build_property.EnforceExtendedAnalyzerRules =
9 | build_property._SupportedPlatformList = Linux,macOS,Windows
10 | build_property.RootNamespace = VaultEdge.API
11 | build_property.RootNamespace = VaultEdge.API
12 | build_property.ProjectDir = C:\Users\HP\OneDrive\Desktop\VaultEdge\VaultEdge.API\VaultEdge.API\
13 | build_property.EnableComHosting =
14 | build_property.EnableGeneratedComInterfaceComImportInterop =
15 | build_property.RazorLangVersion = 9.0
16 | build_property.SupportLocalizedComponentNames =
17 | build_property.GenerateRazorMetadataSourceChecksumAttributes =
18 | build_property.MSBuildProjectDirectory = C:\Users\HP\OneDrive\Desktop\VaultEdge\VaultEdge.API\VaultEdge.API
19 | build_property._RazorSourceGeneratorDebug =
20 | build_property.EffectiveAnalysisLevelStyle = 9.0
21 | build_property.EnableCodeStyleSeverity =
22 |
--------------------------------------------------------------------------------
/VaultEdge.API/VaultEdge.API/Program.cs:
--------------------------------------------------------------------------------
1 | var builder = WebApplication.CreateBuilder(args);
2 |
3 | // Add services to the container.
4 | // Learn more about configuring OpenAPI at https://aka.ms/aspnet/openapi
5 | builder.Services.AddOpenApi();
6 |
7 | var app = builder.Build();
8 |
9 | // Configure the HTTP request pipeline.
10 | if (app.Environment.IsDevelopment())
11 | {
12 | app.MapOpenApi();
13 | }
14 |
15 | app.UseHttpsRedirection();
16 |
17 | var summaries = new[]
18 | {
19 | "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
20 | };
21 |
22 | app.MapGet("/weatherforecast", () =>
23 | {
24 | var forecast = Enumerable.Range(1, 5).Select(index =>
25 | new WeatherForecast
26 | (
27 | DateOnly.FromDateTime(DateTime.Now.AddDays(index)),
28 | Random.Shared.Next(-20, 55),
29 | summaries[Random.Shared.Next(summaries.Length)]
30 | ))
31 | .ToArray();
32 | return forecast;
33 | })
34 | .WithName("GetWeatherForecast");
35 |
36 | app.Run();
37 |
38 | record WeatherForecast(DateOnly Date, int TemperatureC, string? Summary)
39 | {
40 | public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
41 | }
42 |
--------------------------------------------------------------------------------
/VaultEdge.Docs/API_Structure.md:
--------------------------------------------------------------------------------
1 | ---
2 |
3 | ## 📗 `API_Structure.md`
4 |
5 | ```markdown
6 | # 📚 VaultEdge API Documentation
7 |
8 | This document describes the API endpoints of the VaultEdge backend system and their functions.
9 |
10 | ---
11 |
12 | ## 🔐 AuthController
13 |
14 | | Endpoint | Method | Description |
15 | |--------------------|------|--------------------------|
16 | | `/api/auth/login` | POST | User login |
17 | | `/api/auth/register` | POST | New user registration|
18 | | `/api/auth/refresh` | POST | Token renewal |
19 |
20 | ---
21 |
22 | ## 🗄️ VaultController
23 |
24 | | Endpoint | Method | Description |
25 | |--------------------------|-------|---------------------------------|
26 | | `/api/vault/{userId}` | GET | User vault items |
27 | | `/api/vault` | POST | Add new vault item |
28 | | `/api/vault/{id}` | PUT | Update Vault item |
29 | | `/api/vault/{id}` | DELETE| Delete Vault item |
30 |
31 | ---
32 |
33 | ## 👤 UserController
34 |
35 | | Endpoint | Method | Description |
36 | |--------------------|------|----------------------|
37 | | `/api/user/{id}` | GET | User information |
38 | | `/api/user` | GET | Show all users|
39 |
40 | ---
41 |
42 | ## 📦 Response Format
43 |
44 | ```json
45 | {
46 | "success": true,
47 | "message": "OK",
48 | "data": { ... }
49 | }
--------------------------------------------------------------------------------
/VaultEdge.Data/Repositories/VaultRepository.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Linq;
3 | using VaultEdge.Core.Models;
4 | using VaultEdge.Data;
5 |
6 | namespace VaultEdge.Data.Repositories
7 | {
8 | public class VaultRepository
9 | {
10 | private readonly VaultDbContext _context;
11 |
12 | public VaultRepository(VaultDbContext context)
13 | {
14 | _context = context;
15 | }
16 |
17 | public IEnumerable GetByUserId(string userId) =>
18 | _context.VaultItems.Where(v => v.UserId == userId).ToList();
19 |
20 | public VaultItem GetById(string id) => _context.VaultItems.Find(id);
21 |
22 | public void Add(VaultItem item)
23 | {
24 | _context.VaultItems.Add(item);
25 | _context.SaveChanges();
26 | }
27 |
28 | public void Update(VaultItem item)
29 | {
30 | _context.VaultItems.Update(item);
31 | _context.SaveChanges();
32 | }
33 |
34 | public void Delete(string id)
35 | {
36 | var item = _context.VaultItems.Find(id);
37 | if (item != null)
38 | {
39 | _context.VaultItems.Remove(item);
40 | _context.SaveChanges();
41 | }
42 | }
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/VaultEdge.Data/Repositories/UserRepository.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Linq;
3 | using VaultEdge.Core.Models;
4 | using VaultEdge.Data;
5 |
6 | namespace VaultEdge.Data.Repositories
7 | {
8 | public class UserRepository
9 | {
10 | private readonly VaultDbContext _context;
11 |
12 | public UserRepository(VaultDbContext context)
13 | {
14 | _context = context;
15 | }
16 |
17 | public IEnumerable GetAll() => _context.Users.ToList();
18 |
19 | public User GetById(string id) => _context.Users.Find(id);
20 |
21 | public User GetByUsername(string username) =>
22 | _context.Users.FirstOrDefault(u => u.Username == username);
23 |
24 | public void Add(User user)
25 | {
26 | _context.Users.Add(user);
27 | _context.SaveChanges();
28 | }
29 |
30 | public void Update(User user)
31 | {
32 | _context.Users.Update(user);
33 | _context.SaveChanges();
34 | }
35 |
36 | public void Delete(string id)
37 | {
38 | var user = _context.Users.Find(id);
39 | if (user != null)
40 | {
41 | _context.Users.Remove(user);
42 | _context.SaveChanges();
43 | }
44 | }
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/VaultEdge.Security/JwtTokenGenerator.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IdentityModel.Tokens.Jwt;
3 | using System.Security.Claims;
4 | using System.Text;
5 | using Microsoft.IdentityModel.Tokens;
6 | using VaultEdge.Core.Models;
7 |
8 | namespace VaultEdge.Security
9 | {
10 | public class JwtTokenGenerator
11 | {
12 | private readonly string _secretKey = "VaultEdgeSuperSecretKey123!";
13 |
14 | public string Generate(User user)
15 | {
16 | var tokenHandler = new JwtSecurityTokenHandler();
17 | var key = Encoding.ASCII.GetBytes(_secretKey);
18 |
19 | var tokenDescriptor = new SecurityTokenDescriptor
20 | {
21 | Subject = new ClaimsIdentity(new[]
22 | {
23 | new Claim(ClaimTypes.NameIdentifier, user.Id),
24 | new Claim(ClaimTypes.Name, user.Username),
25 | new Claim(ClaimTypes.Role, user.Role)
26 | }),
27 | Expires = DateTime.UtcNow.AddHours(2),
28 | SigningCredentials = new SigningCredentials(
29 | new SymmetricSecurityKey(key),
30 | SecurityAlgorithms.HmacSha256Signature
31 | )
32 | };
33 |
34 | var token = tokenHandler.CreateToken(tokenDescriptor);
35 | return tokenHandler.WriteToken(token);
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/VaultEdge.API/Controllers/VaultController.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.AspNetCore.Mvc;
2 | using VaultEdge.Core.Interfaces;
3 | using VaultEdge.Core.Models;
4 |
5 | namespace VaultEdge.API.Controllers
6 | {
7 | [ApiController]
8 | [Route("api/[controller]")]
9 | public class VaultController : ControllerBase
10 | {
11 | private readonly IVaultService _vaultService;
12 |
13 | public VaultController(IVaultService vaultService)
14 | {
15 | _vaultService = vaultService;
16 | }
17 |
18 | [HttpGet("{userId}")]
19 | public IActionResult GetVaultItems(string userId)
20 | {
21 | var items = _vaultService.GetItems(userId);
22 | return Ok(items);
23 | }
24 |
25 | [HttpPost]
26 | public IActionResult AddVaultItem([FromBody] VaultItem item)
27 | {
28 | var result = _vaultService.AddItem(item);
29 | return Ok(result);
30 | }
31 |
32 | [HttpPut("{id}")]
33 | public IActionResult UpdateVaultItem(string id, [FromBody] VaultItem item)
34 | {
35 | var result = _vaultService.UpdateItem(id, item);
36 | return Ok(result);
37 | }
38 |
39 | [HttpDelete("{id}")]
40 | public IActionResult DeleteVaultItem(string id)
41 | {
42 | var result = _vaultService.DeleteItem(id);
43 | return Ok(result);
44 | }
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/VaultEdge.Tests/UserTests.cs:
--------------------------------------------------------------------------------
1 | using Xunit;
2 | using VaultEdge.Core.Services;
3 | using VaultEdge.Core.Models;
4 | using System.Linq;
5 |
6 | namespace VaultEdge.Tests
7 | {
8 | public class UserTests
9 | {
10 | [Fact]
11 | public void Should_Create_And_Fetch_User()
12 | {
13 | var service = new UserService();
14 |
15 | var request = new UserRegisterRequest
16 | {
17 | Username = "neo",
18 | Password = "matrix",
19 | Email = "neo@vault.com"
20 | };
21 |
22 | var result = service.CreateUser(request);
23 | Assert.True(result.Success);
24 |
25 | var user = service.GetUserById(result.Token.Split('-')[1]);
26 | Assert.NotNull(user);
27 | Assert.Equal("neo", user.Username);
28 | }
29 |
30 | [Fact]
31 | public void Should_Not_Allow_Duplicate_Username()
32 | {
33 | var service = new UserService();
34 |
35 | var req1 = new UserRegisterRequest { Username = "admin", Password = "123", Email = "a@a.com" };
36 | var req2 = new UserRegisterRequest { Username = "admin", Password = "456", Email = "b@b.com" };
37 |
38 | var res1 = service.CreateUser(req1);
39 | var res2 = service.CreateUser(req2);
40 |
41 | Assert.True(res1.Success);
42 | Assert.False(res2.Success);
43 | }
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/VaultEdge.Core/Services/VaultService.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Linq;
3 | using VaultEdge.Core.Interfaces;
4 | using VaultEdge.Core.Models;
5 |
6 | namespace VaultEdge.Core.Services
7 | {
8 | public class VaultService : IVaultService
9 | {
10 | private readonly List _items = new();
11 |
12 | public IEnumerable GetItems(string userId)
13 | {
14 | return _items.Where(i => i.UserId == userId);
15 | }
16 |
17 | public VaultItem AddItem(VaultItem item)
18 | {
19 | item.Id = Guid.NewGuid().ToString();
20 | item.CreatedAt = DateTime.UtcNow;
21 | item.UpdatedAt = DateTime.UtcNow;
22 | _items.Add(item);
23 | return item;
24 | }
25 |
26 | public VaultItem UpdateItem(string id, VaultItem item)
27 | {
28 | var existing = _items.FirstOrDefault(i => i.Id == id);
29 | if (existing == null) return null;
30 |
31 | existing.Title = item.Title;
32 | existing.Content = item.Content;
33 | existing.UpdatedAt = DateTime.UtcNow;
34 | return existing;
35 | }
36 |
37 | public bool DeleteItem(string id)
38 | {
39 | var item = _items.FirstOrDefault(i => i.Id == id);
40 | if (item == null) return false;
41 | _items.Remove(item);
42 | return true;
43 | }
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/VaultEdge.Core/Services/UserService.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Linq;
3 | using VaultEdge.Core.Interfaces;
4 | using VaultEdge.Core.Models;
5 |
6 | namespace VaultEdge.Core.Services
7 | {
8 | public class UserService : IUserService
9 | {
10 | private readonly List _users = new();
11 |
12 | public AuthResult CreateUser(UserRegisterRequest request)
13 | {
14 | if (_users.Any(u => u.Username == request.Username))
15 | return new AuthResult { Success = false, Message = "Username already exists" };
16 |
17 | var user = new User
18 | {
19 | Username = request.Username,
20 | Email = request.Email,
21 | PasswordHash = HashPassword(request.Password)
22 | };
23 |
24 | _users.Add(user);
25 | return new AuthResult { Token = "dummy-token", Message = "User created" };
26 | }
27 |
28 | public User ValidateUser(string username, string password)
29 | {
30 | var hash = HashPassword(password);
31 | return _users.FirstOrDefault(u => u.Username == username && u.PasswordHash == hash);
32 | }
33 |
34 | public User GetUserById(string id) => _users.FirstOrDefault(u => u.Id == id);
35 |
36 | public IEnumerable GetAllUsers() => _users;
37 |
38 | private string HashPassword(string password)
39 | {
40 | return Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(password));
41 | }
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/VaultEdge.Tests/VaultTests.cs:
--------------------------------------------------------------------------------
1 | using Xunit;
2 | using VaultEdge.Core.Services;
3 | using VaultEdge.Core.Models;
4 | using System.Linq;
5 |
6 | namespace VaultEdge.Tests
7 | {
8 | public class VaultTests
9 | {
10 | [Fact]
11 | public void Should_Add_And_Retrieve_VaultItem()
12 | {
13 | var vaultService = new VaultService();
14 |
15 | var item = new VaultItem
16 | {
17 | UserId = "user123",
18 | Title = "My Secret",
19 | Content = "Encrypted content"
20 | };
21 |
22 | var added = vaultService.AddItem(item);
23 | Assert.NotNull(added);
24 | Assert.Equal("My Secret", added.Title);
25 |
26 | var items = vaultService.GetItems("user123").ToList();
27 | Assert.Single(items);
28 | Assert.Equal("Encrypted content", items[0].Content);
29 | }
30 |
31 | [Fact]
32 | public void Should_Update_And_Delete_VaultItem()
33 | {
34 | var vaultService = new VaultService();
35 |
36 | var item = vaultService.AddItem(new VaultItem
37 | {
38 | UserId = "user456",
39 | Title = "Old Title",
40 | Content = "Old Content"
41 | });
42 |
43 | item.Title = "New Title";
44 | item.Content = "New Content";
45 | var updated = vaultService.UpdateItem(item.Id, item);
46 |
47 | Assert.Equal("New Title", updated.Title);
48 |
49 | var deleted = vaultService.DeleteItem(item.Id);
50 | Assert.True(deleted);
51 | }
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/VaultEdge.API/Controllers/AuthController.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.AspNetCore.Mvc;
2 | using VaultEdge.Core.Interfaces;
3 | using VaultEdge.Core.Models;
4 |
5 | namespace VaultEdge.API.Controllers
6 | {
7 | [ApiController]
8 | [Route("api/[controller]")]
9 | public class AuthController : ControllerBase
10 | {
11 | private readonly ITokenService _tokenService;
12 | private readonly IUserService _userService;
13 |
14 | public AuthController(ITokenService tokenService, IUserService userService)
15 | {
16 | _tokenService = tokenService;
17 | _userService = userService;
18 | }
19 |
20 | [HttpPost("login")]
21 | public IActionResult Login([FromBody] UserLoginRequest request)
22 | {
23 | var user = _userService.ValidateUser(request.Username, request.Password);
24 | if (user == null)
25 | return Unauthorized("Invalid credentials");
26 |
27 | var token = _tokenService.GenerateToken(user);
28 | return Ok(new AuthResult { Token = token });
29 | }
30 |
31 | [HttpPost("register")]
32 | public IActionResult Register([FromBody] UserRegisterRequest request)
33 | {
34 | var result = _userService.CreateUser(request);
35 | if (!result.Success)
36 | return BadRequest(result.Message);
37 |
38 | return Ok(result);
39 | }
40 |
41 | [HttpPost("refresh")]
42 | public IActionResult RefreshToken([FromBody] TokenRefreshRequest request)
43 | {
44 | var newToken = _tokenService.RefreshToken(request.Token);
45 | if (string.IsNullOrEmpty(newToken))
46 | return Unauthorized("Invalid token");
47 |
48 | return Ok(new AuthResult { Token = newToken });
49 | }
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/VaultEdge.API/VaultEdge.API/bin/Debug/net9.0/VaultEdge.API.deps.json:
--------------------------------------------------------------------------------
1 | {
2 | "runtimeTarget": {
3 | "name": ".NETCoreApp,Version=v9.0",
4 | "signature": ""
5 | },
6 | "compilationOptions": {},
7 | "targets": {
8 | ".NETCoreApp,Version=v9.0": {
9 | "VaultEdge.API/1.0.0": {
10 | "dependencies": {
11 | "Microsoft.AspNetCore.OpenApi": "9.0.8"
12 | },
13 | "runtime": {
14 | "VaultEdge.API.dll": {}
15 | }
16 | },
17 | "Microsoft.AspNetCore.OpenApi/9.0.8": {
18 | "dependencies": {
19 | "Microsoft.OpenApi": "1.6.17"
20 | },
21 | "runtime": {
22 | "lib/net9.0/Microsoft.AspNetCore.OpenApi.dll": {
23 | "assemblyVersion": "9.0.8.0",
24 | "fileVersion": "9.0.825.36808"
25 | }
26 | }
27 | },
28 | "Microsoft.OpenApi/1.6.17": {
29 | "runtime": {
30 | "lib/netstandard2.0/Microsoft.OpenApi.dll": {
31 | "assemblyVersion": "1.6.17.0",
32 | "fileVersion": "1.6.17.0"
33 | }
34 | }
35 | }
36 | }
37 | },
38 | "libraries": {
39 | "VaultEdge.API/1.0.0": {
40 | "type": "project",
41 | "serviceable": false,
42 | "sha512": ""
43 | },
44 | "Microsoft.AspNetCore.OpenApi/9.0.8": {
45 | "type": "package",
46 | "serviceable": true,
47 | "sha512": "sha512-BwF9sQCKmvu93C/pmKxJjPhF5fFB23MEcgTsGL+7W3wKLYawS4lyFSL5/qh00IJzuADLf+1SmvxMaphbyZYqQQ==",
48 | "path": "microsoft.aspnetcore.openapi/9.0.8",
49 | "hashPath": "microsoft.aspnetcore.openapi.9.0.8.nupkg.sha512"
50 | },
51 | "Microsoft.OpenApi/1.6.17": {
52 | "type": "package",
53 | "serviceable": true,
54 | "sha512": "sha512-Le+kehlmrlQfuDFUt1zZ2dVwrhFQtKREdKBo+rexOwaCoYP0/qpgT9tLxCsZjsgR5Itk1UKPcbgO+FyaNid/bA==",
55 | "path": "microsoft.openapi/1.6.17",
56 | "hashPath": "microsoft.openapi.1.6.17.nupkg.sha512"
57 | }
58 | }
59 | }
--------------------------------------------------------------------------------
/VaultEdge.API/Startup.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.AspNetCore.Builder;
2 | using Microsoft.AspNetCore.Hosting;
3 | using Microsoft.Extensions.Configuration;
4 | using Microsoft.Extensions.DependencyInjection;
5 | using Microsoft.Extensions.Hosting;
6 | using VaultEdge.Core.Interfaces;
7 | using VaultEdge.Core.Services;
8 | using VaultEdge.Data;
9 | using Microsoft.EntityFrameworkCore;
10 | using Microsoft.OpenApi.Models;
11 |
12 | namespace VaultEdge.API
13 | {
14 | public class Startup
15 | {
16 | public IConfiguration Configuration { get; }
17 |
18 | public Startup(IConfiguration configuration)
19 | {
20 | Configuration = configuration;
21 | }
22 |
23 | public void ConfigureServices(IServiceCollection services)
24 | {
25 | services.AddControllers();
26 |
27 | services.AddDbContext(options =>
28 | options.UseInMemoryDatabase("VaultEdgeDB"));
29 |
30 | services.AddScoped();
31 | services.AddScoped();
32 | services.AddScoped();
33 |
34 | services.AddSwaggerGen(c =>
35 | {
36 | c.SwaggerDoc("v1", new OpenApiInfo { Title = "VaultEdge API", Version = "v1" });
37 | });
38 |
39 | services.AddCors(options =>
40 | {
41 | options.AddPolicy("AllowAll", builder =>
42 | builder.AllowAnyOrigin().AllowAnyMethod().AllowAnyHeader());
43 | });
44 | }
45 |
46 | public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
47 | {
48 | if (env.IsDevelopment())
49 | {
50 | app.UseDeveloperExceptionPage();
51 | }
52 |
53 | app.UseCors("AllowAll");
54 |
55 | app.UseRouting();
56 |
57 | app.UseAuthorization();
58 |
59 | app.UseEndpoints(endpoints =>
60 | {
61 | endpoints.MapControllers();
62 | });
63 |
64 | app.UseSwagger();
65 | app.UseSwaggerUI(c =>
66 | {
67 | c.SwaggerEndpoint("/swagger/v1/swagger.json", "VaultEdge API v1");
68 | });
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/VaultEdge.API/VaultEdge.API/obj/VaultEdge.API.csproj.nuget.dgspec.json:
--------------------------------------------------------------------------------
1 | {
2 | "format": 1,
3 | "restore": {
4 | "C:\\Users\\HP\\OneDrive\\Desktop\\VaultEdge\\VaultEdge.API\\VaultEdge.API\\VaultEdge.API.csproj": {}
5 | },
6 | "projects": {
7 | "C:\\Users\\HP\\OneDrive\\Desktop\\VaultEdge\\VaultEdge.API\\VaultEdge.API\\VaultEdge.API.csproj": {
8 | "version": "1.0.0",
9 | "restore": {
10 | "projectUniqueName": "C:\\Users\\HP\\OneDrive\\Desktop\\VaultEdge\\VaultEdge.API\\VaultEdge.API\\VaultEdge.API.csproj",
11 | "projectName": "VaultEdge.API",
12 | "projectPath": "C:\\Users\\HP\\OneDrive\\Desktop\\VaultEdge\\VaultEdge.API\\VaultEdge.API\\VaultEdge.API.csproj",
13 | "packagesPath": "C:\\Users\\HP\\.nuget\\packages\\",
14 | "outputPath": "C:\\Users\\HP\\OneDrive\\Desktop\\VaultEdge\\VaultEdge.API\\VaultEdge.API\\obj\\",
15 | "projectStyle": "PackageReference",
16 | "configFilePaths": [
17 | "C:\\Users\\HP\\AppData\\Roaming\\NuGet\\NuGet.Config"
18 | ],
19 | "originalTargetFrameworks": [
20 | "net9.0"
21 | ],
22 | "sources": {
23 | "https://api.nuget.org/v3/index.json": {}
24 | },
25 | "frameworks": {
26 | "net9.0": {
27 | "targetAlias": "net9.0",
28 | "projectReferences": {}
29 | }
30 | },
31 | "warningProperties": {
32 | "warnAsError": [
33 | "NU1605"
34 | ]
35 | },
36 | "restoreAuditProperties": {
37 | "enableAudit": "true",
38 | "auditLevel": "low",
39 | "auditMode": "direct"
40 | },
41 | "SdkAnalysisLevel": "9.0.300"
42 | },
43 | "frameworks": {
44 | "net9.0": {
45 | "targetAlias": "net9.0",
46 | "dependencies": {
47 | "Microsoft.AspNetCore.OpenApi": {
48 | "target": "Package",
49 | "version": "[9.0.8, )"
50 | }
51 | },
52 | "imports": [
53 | "net461",
54 | "net462",
55 | "net47",
56 | "net471",
57 | "net472",
58 | "net48",
59 | "net481"
60 | ],
61 | "assetTargetFallback": true,
62 | "warn": true,
63 | "frameworkReferences": {
64 | "Microsoft.AspNetCore.App": {
65 | "privateAssets": "none"
66 | },
67 | "Microsoft.NETCore.App": {
68 | "privateAssets": "all"
69 | }
70 | },
71 | "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\9.0.304/PortableRuntimeIdentifierGraph.json"
72 | }
73 | }
74 | }
75 | }
76 | }
--------------------------------------------------------------------------------
/VaultEdge.API/VaultEdge.API/obj/Debug/net9.0/VaultEdge.API.csproj.FileListAbsolute.txt:
--------------------------------------------------------------------------------
1 | C:\Users\HP\OneDrive\Desktop\VaultEdge\VaultEdge.API\VaultEdge.API\bin\Debug\net9.0\appsettings.Development.json
2 | C:\Users\HP\OneDrive\Desktop\VaultEdge\VaultEdge.API\VaultEdge.API\bin\Debug\net9.0\appsettings.json
3 | C:\Users\HP\OneDrive\Desktop\VaultEdge\VaultEdge.API\VaultEdge.API\bin\Debug\net9.0\VaultEdge.API.staticwebassets.endpoints.json
4 | C:\Users\HP\OneDrive\Desktop\VaultEdge\VaultEdge.API\VaultEdge.API\bin\Debug\net9.0\VaultEdge.API.exe
5 | C:\Users\HP\OneDrive\Desktop\VaultEdge\VaultEdge.API\VaultEdge.API\bin\Debug\net9.0\VaultEdge.API.deps.json
6 | C:\Users\HP\OneDrive\Desktop\VaultEdge\VaultEdge.API\VaultEdge.API\bin\Debug\net9.0\VaultEdge.API.runtimeconfig.json
7 | C:\Users\HP\OneDrive\Desktop\VaultEdge\VaultEdge.API\VaultEdge.API\bin\Debug\net9.0\VaultEdge.API.dll
8 | C:\Users\HP\OneDrive\Desktop\VaultEdge\VaultEdge.API\VaultEdge.API\bin\Debug\net9.0\VaultEdge.API.pdb
9 | C:\Users\HP\OneDrive\Desktop\VaultEdge\VaultEdge.API\VaultEdge.API\bin\Debug\net9.0\Microsoft.AspNetCore.OpenApi.dll
10 | C:\Users\HP\OneDrive\Desktop\VaultEdge\VaultEdge.API\VaultEdge.API\bin\Debug\net9.0\Microsoft.OpenApi.dll
11 | C:\Users\HP\OneDrive\Desktop\VaultEdge\VaultEdge.API\VaultEdge.API\obj\Debug\net9.0\VaultEdge.API.csproj.AssemblyReference.cache
12 | C:\Users\HP\OneDrive\Desktop\VaultEdge\VaultEdge.API\VaultEdge.API\obj\Debug\net9.0\rpswa.dswa.cache.json
13 | C:\Users\HP\OneDrive\Desktop\VaultEdge\VaultEdge.API\VaultEdge.API\obj\Debug\net9.0\VaultEdge.API.GeneratedMSBuildEditorConfig.editorconfig
14 | C:\Users\HP\OneDrive\Desktop\VaultEdge\VaultEdge.API\VaultEdge.API\obj\Debug\net9.0\VaultEdge.API.AssemblyInfoInputs.cache
15 | C:\Users\HP\OneDrive\Desktop\VaultEdge\VaultEdge.API\VaultEdge.API\obj\Debug\net9.0\VaultEdge.API.AssemblyInfo.cs
16 | C:\Users\HP\OneDrive\Desktop\VaultEdge\VaultEdge.API\VaultEdge.API\obj\Debug\net9.0\VaultEdge.API.csproj.CoreCompileInputs.cache
17 | C:\Users\HP\OneDrive\Desktop\VaultEdge\VaultEdge.API\VaultEdge.API\obj\Debug\net9.0\VaultEdge.API.MvcApplicationPartsAssemblyInfo.cs
18 | C:\Users\HP\OneDrive\Desktop\VaultEdge\VaultEdge.API\VaultEdge.API\obj\Debug\net9.0\VaultEdge.API.MvcApplicationPartsAssemblyInfo.cache
19 | C:\Users\HP\OneDrive\Desktop\VaultEdge\VaultEdge.API\VaultEdge.API\obj\Debug\net9.0\rjimswa.dswa.cache.json
20 | C:\Users\HP\OneDrive\Desktop\VaultEdge\VaultEdge.API\VaultEdge.API\obj\Debug\net9.0\rjsmrazor.dswa.cache.json
21 | C:\Users\HP\OneDrive\Desktop\VaultEdge\VaultEdge.API\VaultEdge.API\obj\Debug\net9.0\rjsmcshtml.dswa.cache.json
22 | C:\Users\HP\OneDrive\Desktop\VaultEdge\VaultEdge.API\VaultEdge.API\obj\Debug\net9.0\scopedcss\bundle\VaultEdge.API.styles.css
23 | C:\Users\HP\OneDrive\Desktop\VaultEdge\VaultEdge.API\VaultEdge.API\obj\Debug\net9.0\staticwebassets.build.json
24 | C:\Users\HP\OneDrive\Desktop\VaultEdge\VaultEdge.API\VaultEdge.API\obj\Debug\net9.0\staticwebassets.build.json.cache
25 | C:\Users\HP\OneDrive\Desktop\VaultEdge\VaultEdge.API\VaultEdge.API\obj\Debug\net9.0\staticwebassets.development.json
26 | C:\Users\HP\OneDrive\Desktop\VaultEdge\VaultEdge.API\VaultEdge.API\obj\Debug\net9.0\staticwebassets.build.endpoints.json
27 | C:\Users\HP\OneDrive\Desktop\VaultEdge\VaultEdge.API\VaultEdge.API\obj\Debug\net9.0\VaultEdg.B0CB2EB5.Up2Date
28 | C:\Users\HP\OneDrive\Desktop\VaultEdge\VaultEdge.API\VaultEdge.API\obj\Debug\net9.0\VaultEdge.API.dll
29 | C:\Users\HP\OneDrive\Desktop\VaultEdge\VaultEdge.API\VaultEdge.API\obj\Debug\net9.0\refint\VaultEdge.API.dll
30 | C:\Users\HP\OneDrive\Desktop\VaultEdge\VaultEdge.API\VaultEdge.API\obj\Debug\net9.0\VaultEdge.API.pdb
31 | C:\Users\HP\OneDrive\Desktop\VaultEdge\VaultEdge.API\VaultEdge.API\obj\Debug\net9.0\VaultEdge.API.genruntimeconfig.cache
32 | C:\Users\HP\OneDrive\Desktop\VaultEdge\VaultEdge.API\VaultEdge.API\obj\Debug\net9.0\ref\VaultEdge.API.dll
33 |
--------------------------------------------------------------------------------
/VaultEdge.API/VaultEdge.API/obj/project.assets.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": 3,
3 | "targets": {
4 | "net9.0": {
5 | "Microsoft.AspNetCore.OpenApi/9.0.8": {
6 | "type": "package",
7 | "dependencies": {
8 | "Microsoft.OpenApi": "1.6.17"
9 | },
10 | "compile": {
11 | "lib/net9.0/Microsoft.AspNetCore.OpenApi.dll": {
12 | "related": ".xml"
13 | }
14 | },
15 | "runtime": {
16 | "lib/net9.0/Microsoft.AspNetCore.OpenApi.dll": {
17 | "related": ".xml"
18 | }
19 | },
20 | "frameworkReferences": [
21 | "Microsoft.AspNetCore.App"
22 | ]
23 | },
24 | "Microsoft.OpenApi/1.6.17": {
25 | "type": "package",
26 | "compile": {
27 | "lib/netstandard2.0/Microsoft.OpenApi.dll": {
28 | "related": ".xml;.pdb"
29 | }
30 | },
31 | "runtime": {
32 | "lib/netstandard2.0/Microsoft.OpenApi.dll": {
33 | "related": ".xml;.pdb"
34 | }
35 | }
36 | }
37 | }
38 | },
39 | "libraries": {
40 | "Microsoft.AspNetCore.OpenApi/9.0.8": {
41 | "sha512": "BwF9sQCKmvu93C/pmKxJjPhF5fFB23MEcgTsGL+7W3wKLYawS4lyFSL5/qh00IJzuADLf+1SmvxMaphbyZYqQQ==",
42 | "type": "package",
43 | "path": "microsoft.aspnetcore.openapi/9.0.8",
44 | "files": [
45 | ".nupkg.metadata",
46 | ".signature.p7s",
47 | "Icon.png",
48 | "PACKAGE.md",
49 | "THIRD-PARTY-NOTICES.TXT",
50 | "lib/net9.0/Microsoft.AspNetCore.OpenApi.dll",
51 | "lib/net9.0/Microsoft.AspNetCore.OpenApi.xml",
52 | "microsoft.aspnetcore.openapi.9.0.8.nupkg.sha512",
53 | "microsoft.aspnetcore.openapi.nuspec"
54 | ]
55 | },
56 | "Microsoft.OpenApi/1.6.17": {
57 | "sha512": "Le+kehlmrlQfuDFUt1zZ2dVwrhFQtKREdKBo+rexOwaCoYP0/qpgT9tLxCsZjsgR5Itk1UKPcbgO+FyaNid/bA==",
58 | "type": "package",
59 | "path": "microsoft.openapi/1.6.17",
60 | "files": [
61 | ".nupkg.metadata",
62 | ".signature.p7s",
63 | "README.md",
64 | "lib/netstandard2.0/Microsoft.OpenApi.dll",
65 | "lib/netstandard2.0/Microsoft.OpenApi.pdb",
66 | "lib/netstandard2.0/Microsoft.OpenApi.xml",
67 | "microsoft.openapi.1.6.17.nupkg.sha512",
68 | "microsoft.openapi.nuspec"
69 | ]
70 | }
71 | },
72 | "projectFileDependencyGroups": {
73 | "net9.0": [
74 | "Microsoft.AspNetCore.OpenApi >= 9.0.8"
75 | ]
76 | },
77 | "packageFolders": {
78 | "C:\\Users\\HP\\.nuget\\packages\\": {}
79 | },
80 | "project": {
81 | "version": "1.0.0",
82 | "restore": {
83 | "projectUniqueName": "C:\\Users\\HP\\OneDrive\\Desktop\\VaultEdge\\VaultEdge.API\\VaultEdge.API\\VaultEdge.API.csproj",
84 | "projectName": "VaultEdge.API",
85 | "projectPath": "C:\\Users\\HP\\OneDrive\\Desktop\\VaultEdge\\VaultEdge.API\\VaultEdge.API\\VaultEdge.API.csproj",
86 | "packagesPath": "C:\\Users\\HP\\.nuget\\packages\\",
87 | "outputPath": "C:\\Users\\HP\\OneDrive\\Desktop\\VaultEdge\\VaultEdge.API\\VaultEdge.API\\obj\\",
88 | "projectStyle": "PackageReference",
89 | "configFilePaths": [
90 | "C:\\Users\\HP\\AppData\\Roaming\\NuGet\\NuGet.Config"
91 | ],
92 | "originalTargetFrameworks": [
93 | "net9.0"
94 | ],
95 | "sources": {
96 | "https://api.nuget.org/v3/index.json": {}
97 | },
98 | "frameworks": {
99 | "net9.0": {
100 | "targetAlias": "net9.0",
101 | "projectReferences": {}
102 | }
103 | },
104 | "warningProperties": {
105 | "warnAsError": [
106 | "NU1605"
107 | ]
108 | },
109 | "restoreAuditProperties": {
110 | "enableAudit": "true",
111 | "auditLevel": "low",
112 | "auditMode": "direct"
113 | },
114 | "SdkAnalysisLevel": "9.0.300"
115 | },
116 | "frameworks": {
117 | "net9.0": {
118 | "targetAlias": "net9.0",
119 | "dependencies": {
120 | "Microsoft.AspNetCore.OpenApi": {
121 | "target": "Package",
122 | "version": "[9.0.8, )"
123 | }
124 | },
125 | "imports": [
126 | "net461",
127 | "net462",
128 | "net47",
129 | "net471",
130 | "net472",
131 | "net48",
132 | "net481"
133 | ],
134 | "assetTargetFallback": true,
135 | "warn": true,
136 | "frameworkReferences": {
137 | "Microsoft.AspNetCore.App": {
138 | "privateAssets": "none"
139 | },
140 | "Microsoft.NETCore.App": {
141 | "privateAssets": "all"
142 | }
143 | },
144 | "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\9.0.304/PortableRuntimeIdentifierGraph.json"
145 | }
146 | }
147 | }
148 | }
--------------------------------------------------------------------------------