diff --git a/.vs/uWine/DesignTimeBuild/.dtbcache.v2 b/.vs/uWine/DesignTimeBuild/.dtbcache.v2 index 7fa485b..56ba631 100644 Binary files a/.vs/uWine/DesignTimeBuild/.dtbcache.v2 and b/.vs/uWine/DesignTimeBuild/.dtbcache.v2 differ diff --git a/.vs/uWine/v17/.suo b/.vs/uWine/v17/.suo index 2e3d3c5..a5b8c15 100644 Binary files a/.vs/uWine/v17/.suo and b/.vs/uWine/v17/.suo differ diff --git a/.vs/uWine/v17/DocumentLayout.backup.json b/.vs/uWine/v17/DocumentLayout.backup.json index 898d65c..8905074 100644 --- a/.vs/uWine/v17/DocumentLayout.backup.json +++ b/.vs/uWine/v17/DocumentLayout.backup.json @@ -2,17 +2,53 @@ "Version": 1, "WorkspaceRootPath": "M:\\uv\\uWine\\", "Documents": [ + { + "AbsoluteMoniker": "D:0:0:{8E5D260E-7395-4875-8A4F-16205F92AD38}|uWine.Api\\uWine.Api.csproj|m:\\uv\\uwine\\uwine.api\\controllers\\testcontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{8E5D260E-7395-4875-8A4F-16205F92AD38}|uWine.Api\\uWine.Api.csproj|solutionrelative:uwine.api\\controllers\\testcontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{8E5D260E-7395-4875-8A4F-16205F92AD38}|uWine.Api\\uWine.Api.csproj|m:\\uv\\uwine\\uwine.api\\controllers\\usercontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{8E5D260E-7395-4875-8A4F-16205F92AD38}|uWine.Api\\uWine.Api.csproj|solutionrelative:uwine.api\\controllers\\usercontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{1DCFCDC3-C4A6-4864-8868-94AAB81C3DBA}|uWine.Core.Domain\\uWine.Core.Domain.csproj|m:\\uv\\uwine\\uwine.core.domain\\entities\\user.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{1DCFCDC3-C4A6-4864-8868-94AAB81C3DBA}|uWine.Core.Domain\\uWine.Core.Domain.csproj|solutionrelative:uwine.core.domain\\entities\\user.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, { "AbsoluteMoniker": "D:0:0:{50360CEE-B38B-4729-ACA3-ABC3ED3538E9}|uWine.Core.Infrastructure\\uWine.Core.Infrastructure.csproj|m:\\uv\\uwine\\uwine.core.infrastructure\\repository\\mariadbauthenticationrepository.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{50360CEE-B38B-4729-ACA3-ABC3ED3538E9}|uWine.Core.Infrastructure\\uWine.Core.Infrastructure.csproj|solutionrelative:uwine.core.infrastructure\\repository\\mariadbauthenticationrepository.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" }, + { + "AbsoluteMoniker": "D:0:0:{8E5D260E-7395-4875-8A4F-16205F92AD38}|uWine.Api\\uWine.Api.csproj|m:\\uv\\uwine\\uwine.api\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{8E5D260E-7395-4875-8A4F-16205F92AD38}|uWine.Api\\uWine.Api.csproj|solutionrelative:uwine.api\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{8E5D260E-7395-4875-8A4F-16205F92AD38}|uWine.Api\\uWine.Api.csproj|m:\\uv\\uwine\\uwine.api\\appsettings.json||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}", + "RelativeMoniker": "D:0:0:{8E5D260E-7395-4875-8A4F-16205F92AD38}|uWine.Api\\uWine.Api.csproj|solutionrelative:uwine.api\\appsettings.json||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}" + }, + { + "AbsoluteMoniker": "D:0:0:{50360CEE-B38B-4729-ACA3-ABC3ED3538E9}|uWine.Core.Infrastructure\\uWine.Core.Infrastructure.csproj|m:\\uv\\uwine\\uwine.core.infrastructure\\services\\authenticationservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{50360CEE-B38B-4729-ACA3-ABC3ED3538E9}|uWine.Core.Infrastructure\\uWine.Core.Infrastructure.csproj|solutionrelative:uwine.core.infrastructure\\services\\authenticationservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{1DCFCDC3-C4A6-4864-8868-94AAB81C3DBA}|uWine.Core.Domain\\uWine.Core.Domain.csproj|m:\\uv\\uwine\\uwine.core.domain\\entities\\role.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{1DCFCDC3-C4A6-4864-8868-94AAB81C3DBA}|uWine.Core.Domain\\uWine.Core.Domain.csproj|solutionrelative:uwine.core.domain\\entities\\role.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, { "AbsoluteMoniker": "D:0:0:{1DCFCDC3-C4A6-4864-8868-94AAB81C3DBA}|uWine.Core.Domain\\uWine.Core.Domain.csproj|m:\\uv\\uwine\\uwine.core.domain\\repositories\\iauthenticationrepository.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{1DCFCDC3-C4A6-4864-8868-94AAB81C3DBA}|uWine.Core.Domain\\uWine.Core.Domain.csproj|solutionrelative:uwine.core.domain\\repositories\\iauthenticationrepository.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" }, { - "AbsoluteMoniker": "D:0:0:{50360CEE-B38B-4729-ACA3-ABC3ED3538E9}|uWine.Core.Infrastructure\\uWine.Core.Infrastructure.csproj|m:\\uv\\uwine\\uwine.core.infrastructure\\services\\authenticationservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{50360CEE-B38B-4729-ACA3-ABC3ED3538E9}|uWine.Core.Infrastructure\\uWine.Core.Infrastructure.csproj|solutionrelative:uwine.core.infrastructure\\services\\authenticationservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + "AbsoluteMoniker": "D:0:0:{1DCFCDC3-C4A6-4864-8868-94AAB81C3DBA}|uWine.Core.Domain\\uWine.Core.Domain.csproj|m:\\uv\\uwine\\uwine.core.domain\\entities\\vineplant.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{1DCFCDC3-C4A6-4864-8868-94AAB81C3DBA}|uWine.Core.Domain\\uWine.Core.Domain.csproj|solutionrelative:uwine.core.domain\\entities\\vineplant.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{50360CEE-B38B-4729-ACA3-ABC3ED3538E9}|uWine.Core.Infrastructure\\uWine.Core.Infrastructure.csproj|m:\\uv\\uwine\\uwine.core.infrastructure\\services\\ownerservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{50360CEE-B38B-4729-ACA3-ABC3ED3538E9}|uWine.Core.Infrastructure\\uWine.Core.Infrastructure.csproj|solutionrelative:uwine.core.infrastructure\\services\\ownerservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{1DCFCDC3-C4A6-4864-8868-94AAB81C3DBA}|uWine.Core.Domain\\uWine.Core.Domain.csproj|m:\\uv\\uwine\\uwine.core.domain\\entities\\owner.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{1DCFCDC3-C4A6-4864-8868-94AAB81C3DBA}|uWine.Core.Domain\\uWine.Core.Domain.csproj|solutionrelative:uwine.core.domain\\entities\\owner.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" }, { "AbsoluteMoniker": "D:0:0:{1DCFCDC3-C4A6-4864-8868-94AAB81C3DBA}|uWine.Core.Domain\\uWine.Core.Domain.csproj|m:\\uv\\uwine\\uwine.core.domain\\entities\\contact.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", @@ -30,10 +66,6 @@ "AbsoluteMoniker": "D:0:0:{1DCFCDC3-C4A6-4864-8868-94AAB81C3DBA}|uWine.Core.Domain\\uWine.Core.Domain.csproj|m:\\uv\\uwine\\uwine.core.domain\\entities\\vineyard.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{1DCFCDC3-C4A6-4864-8868-94AAB81C3DBA}|uWine.Core.Domain\\uWine.Core.Domain.csproj|solutionrelative:uwine.core.domain\\entities\\vineyard.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" }, - { - "AbsoluteMoniker": "D:0:0:{50360CEE-B38B-4729-ACA3-ABC3ED3538E9}|uWine.Core.Infrastructure\\uWine.Core.Infrastructure.csproj|m:\\uv\\uwine\\uwine.core.infrastructure\\services\\ownerservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{50360CEE-B38B-4729-ACA3-ABC3ED3538E9}|uWine.Core.Infrastructure\\uWine.Core.Infrastructure.csproj|solutionrelative:uwine.core.infrastructure\\services\\ownerservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, { "AbsoluteMoniker": "D:0:0:{50360CEE-B38B-4729-ACA3-ABC3ED3538E9}|uWine.Core.Infrastructure\\uWine.Core.Infrastructure.csproj|m:\\uv\\uwine\\uwine.core.infrastructure\\repository\\mariadbcontactrepository.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{50360CEE-B38B-4729-ACA3-ABC3ED3538E9}|uWine.Core.Infrastructure\\uWine.Core.Infrastructure.csproj|solutionrelative:uwine.core.infrastructure\\repository\\mariadbcontactrepository.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" @@ -42,10 +74,6 @@ "AbsoluteMoniker": "D:0:0:{50360CEE-B38B-4729-ACA3-ABC3ED3538E9}|uWine.Core.Infrastructure\\uWine.Core.Infrastructure.csproj|m:\\uv\\uwine\\uwine.core.infrastructure\\repository\\mariadbaddressrepository.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{50360CEE-B38B-4729-ACA3-ABC3ED3538E9}|uWine.Core.Infrastructure\\uWine.Core.Infrastructure.csproj|solutionrelative:uwine.core.infrastructure\\repository\\mariadbaddressrepository.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" }, - { - "AbsoluteMoniker": "D:0:0:{8E5D260E-7395-4875-8A4F-16205F92AD38}|uWine.Api\\uWine.Api.csproj|m:\\uv\\uwine\\uwine.api\\controllers\\usercontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{8E5D260E-7395-4875-8A4F-16205F92AD38}|uWine.Api\\uWine.Api.csproj|solutionrelative:uwine.api\\controllers\\usercontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, { "AbsoluteMoniker": "D:0:0:{1DCFCDC3-C4A6-4864-8868-94AAB81C3DBA}|uWine.Core.Domain\\uWine.Core.Domain.csproj|m:\\uv\\uwine\\uwine.core.domain\\entities\\contacttype.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{1DCFCDC3-C4A6-4864-8868-94AAB81C3DBA}|uWine.Core.Domain\\uWine.Core.Domain.csproj|solutionrelative:uwine.core.domain\\entities\\contacttype.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" @@ -77,10 +105,6 @@ { "AbsoluteMoniker": "D:0:0:{1DCFCDC3-C4A6-4864-8868-94AAB81C3DBA}|uWine.Core.Domain\\uWine.Core.Domain.csproj|m:\\uv\\uwine\\uwine.core.domain\\entities\\row.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{1DCFCDC3-C4A6-4864-8868-94AAB81C3DBA}|uWine.Core.Domain\\uWine.Core.Domain.csproj|solutionrelative:uwine.core.domain\\entities\\row.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, - { - "AbsoluteMoniker": "D:0:0:{1DCFCDC3-C4A6-4864-8868-94AAB81C3DBA}|uWine.Core.Domain\\uWine.Core.Domain.csproj|m:\\uv\\uwine\\uwine.core.domain\\entities\\vineplant.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{1DCFCDC3-C4A6-4864-8868-94AAB81C3DBA}|uWine.Core.Domain\\uWine.Core.Domain.csproj|solutionrelative:uwine.core.domain\\entities\\vineplant.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" } ], "DocumentGroupContainers": [ @@ -90,8 +114,22 @@ "DocumentGroups": [ { "DockedWidth": 200, - "SelectedChildIndex": 8, + "SelectedChildIndex": 10, "Children": [ + { + "$type": "Document", + "DocumentIndex": 1, + "Title": "UserController.cs", + "DocumentMoniker": "M:\\uv\\uWine\\uWine.Api\\Controllers\\UserController.cs", + "RelativeDocumentMoniker": "uWine.Api\\Controllers\\UserController.cs", + "ToolTip": "M:\\uv\\uWine\\uWine.Api\\Controllers\\UserController.cs", + "RelativeToolTip": "uWine.Api\\Controllers\\UserController.cs", + "ViewState": "AgIAADcAAAAAAAAAAAAswD8AAAAdAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-07-05T12:49:48.611Z", + "IsPinned": true, + "EditorCaption": "" + }, { "$type": "Bookmark", "Name": "ST:0:0:{d78612c7-9962-4b83-95d9-268046dad23a}" @@ -122,72 +160,137 @@ }, { "$type": "Document", - "DocumentIndex": 1, + "DocumentIndex": 7, + "Title": "Role.cs", + "DocumentMoniker": "M:\\uv\\uWine\\uWine.Core.Domain\\Entities\\Role.cs", + "RelativeDocumentMoniker": "uWine.Core.Domain\\Entities\\Role.cs", + "ToolTip": "M:\\uv\\uWine\\uWine.Core.Domain\\Entities\\Role.cs", + "RelativeToolTip": "uWine.Core.Domain\\Entities\\Role.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAA4AAAArAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-07-09T15:32:58.964Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 2, + "Title": "User.cs", + "DocumentMoniker": "M:\\uv\\uWine\\uWine.Core.Domain\\Entities\\User.cs", + "RelativeDocumentMoniker": "uWine.Core.Domain\\Entities\\User.cs", + "ToolTip": "M:\\uv\\uWine\\uWine.Core.Domain\\Entities\\User.cs", + "RelativeToolTip": "uWine.Core.Domain\\Entities\\User.cs", + "ViewState": "AgIAAAwAAAAAAAAAAAAowAwAAAAbAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-07-09T15:30:48.881Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 0, + "Title": "TestController.cs", + "DocumentMoniker": "M:\\uv\\uWine\\uWine.Api\\Controllers\\TestController.cs", + "RelativeDocumentMoniker": "uWine.Api\\Controllers\\TestController.cs", + "ToolTip": "M:\\uv\\uWine\\uWine.Api\\Controllers\\TestController.cs", + "RelativeToolTip": "uWine.Api\\Controllers\\TestController.cs", + "ViewState": "AgIAAAsAAAAAAAAAAAA7wBoAAAAmAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-07-09T14:20:34.76Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 11, + "Title": "Owner.cs", + "DocumentMoniker": "M:\\uv\\uWine\\uWine.Core.Domain\\Entities\\Owner.cs", + "RelativeDocumentMoniker": "uWine.Core.Domain\\Entities\\Owner.cs", + "ToolTip": "M:\\uv\\uWine\\uWine.Core.Domain\\Entities\\Owner.cs", + "RelativeToolTip": "uWine.Core.Domain\\Entities\\Owner.cs", + "ViewState": "AgIAAAsAAAAAAAAAAIA7wB0AAAABAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-07-09T14:14:45.554Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 4, + "Title": "Program.cs", + "DocumentMoniker": "M:\\uv\\uWine\\uWine.Api\\Program.cs", + "RelativeDocumentMoniker": "uWine.Api\\Program.cs", + "ToolTip": "M:\\uv\\uWine\\uWine.Api\\Program.cs", + "RelativeToolTip": "uWine.Api\\Program.cs", + "ViewState": "AgIAABkAAAAAAAAAAAAmwCoAAABDAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-07-09T14:07:06.764Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 5, + "Title": "appsettings.json", + "DocumentMoniker": "M:\\uv\\uWine\\uWine.Api\\appsettings.json", + "RelativeDocumentMoniker": "uWine.Api\\appsettings.json", + "ToolTip": "M:\\uv\\uWine\\uWine.Api\\appsettings.json", + "RelativeToolTip": "uWine.Api\\appsettings.json", + "ViewState": "AgIAAAAAAAAAAAAAAAAAABIAAAAeAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001642|", + "WhenOpened": "2025-07-09T14:06:21.768Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 8, "Title": "IAuthenticationRepository.cs", "DocumentMoniker": "M:\\uv\\uWine\\uWine.Core.Domain\\Repositories\\IAuthenticationRepository.cs", "RelativeDocumentMoniker": "uWine.Core.Domain\\Repositories\\IAuthenticationRepository.cs", "ToolTip": "M:\\uv\\uWine\\uWine.Core.Domain\\Repositories\\IAuthenticationRepository.cs", "RelativeToolTip": "uWine.Core.Domain\\Repositories\\IAuthenticationRepository.cs", - "ViewState": "AgIAAAAAAAAAAAAAAAAAAAgAAAAFAAAAAAAAAA==", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAkAAAAFAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2025-07-06T19:32:07.448Z", "EditorCaption": "" }, { "$type": "Document", - "DocumentIndex": 0, + "DocumentIndex": 3, "Title": "MariaDbAuthenticationRepository.cs", "DocumentMoniker": "M:\\uv\\uWine\\uWine.Core.Infrastructure\\Repository\\MariaDbAuthenticationRepository.cs", "RelativeDocumentMoniker": "uWine.Core.Infrastructure\\Repository\\MariaDbAuthenticationRepository.cs", "ToolTip": "M:\\uv\\uWine\\uWine.Core.Infrastructure\\Repository\\MariaDbAuthenticationRepository.cs", "RelativeToolTip": "uWine.Core.Infrastructure\\Repository\\MariaDbAuthenticationRepository.cs", - "ViewState": "AgIAAAgAAAAAAAAAAAAAwAwAAAABAAAAAAAAAA==", + "ViewState": "AgIAADEAAAAAAAAAAAAswDwAAAAnAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2025-07-05T13:17:22.615Z", "EditorCaption": "" }, { "$type": "Document", - "DocumentIndex": 2, + "DocumentIndex": 6, "Title": "AuthenticationService.cs", "DocumentMoniker": "M:\\uv\\uWine\\uWine.Core.Infrastructure\\Services\\AuthenticationService.cs", "RelativeDocumentMoniker": "uWine.Core.Infrastructure\\Services\\AuthenticationService.cs", "ToolTip": "M:\\uv\\uWine\\uWine.Core.Infrastructure\\Services\\AuthenticationService.cs", "RelativeToolTip": "uWine.Core.Infrastructure\\Services\\AuthenticationService.cs", - "ViewState": "AgIAAAAAAAAAAAAAAAAAAAgAAAABAAAAAAAAAA==", + "ViewState": "AgIAAAMAAAAAAAAAAAAAABoAAAA+AAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2025-07-05T13:13:38.382Z", "EditorCaption": "" }, { "$type": "Document", - "DocumentIndex": 7, + "DocumentIndex": 10, "Title": "OwnerService.cs", "DocumentMoniker": "M:\\uv\\uWine\\uWine.Core.Infrastructure\\Services\\OwnerService.cs", "RelativeDocumentMoniker": "uWine.Core.Infrastructure\\Services\\OwnerService.cs", "ToolTip": "M:\\uv\\uWine\\uWine.Core.Infrastructure\\Services\\OwnerService.cs", "RelativeToolTip": "uWine.Core.Infrastructure\\Services\\OwnerService.cs", - "ViewState": "AgIAAAsAAAAAAAAAAAAUwCQAAAAVAAAAAAAAAA==", + "ViewState": "AgIAABcAAAAAAAAAAAAqwCQAAAAAAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2025-07-05T12:53:14.567Z", "EditorCaption": "" }, { "$type": "Document", - "DocumentIndex": 10, - "Title": "UserController.cs", - "DocumentMoniker": "M:\\uv\\uWine\\uWine.Api\\Controllers\\UserController.cs", - "RelativeDocumentMoniker": "uWine.Api\\Controllers\\UserController.cs", - "ToolTip": "M:\\uv\\uWine\\uWine.Api\\Controllers\\UserController.cs", - "RelativeToolTip": "uWine.Api\\Controllers\\UserController.cs", - "ViewState": "AgIAAAAAAAAAAAAAAAAAAAsAAAAJAAAAAAAAAA==", - "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2025-07-05T12:49:48.611Z", - "EditorCaption": "" - }, - { - "$type": "Document", - "DocumentIndex": 12, + "DocumentIndex": 19, "Title": "IContactRepository.cs", "DocumentMoniker": "M:\\uv\\uWine\\uWine.Core.Domain\\Repositories\\IContactRepository.cs", "RelativeDocumentMoniker": "uWine.Core.Domain\\Repositories\\IContactRepository.cs", @@ -200,7 +303,7 @@ }, { "$type": "Document", - "DocumentIndex": 11, + "DocumentIndex": 18, "Title": "ContactType.cs", "DocumentMoniker": "M:\\uv\\uWine\\uWine.Core.Domain\\Entities\\ContactType.cs", "RelativeDocumentMoniker": "uWine.Core.Domain\\Entities\\ContactType.cs", @@ -208,11 +311,12 @@ "RelativeToolTip": "uWine.Core.Domain\\Entities\\ContactType.cs", "ViewState": "AgIAAAAAAAAAAAAAAAAuwAIAAAARAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2025-07-04T14:33:37.163Z" + "WhenOpened": "2025-07-04T14:33:37.163Z", + "EditorCaption": "" }, { "$type": "Document", - "DocumentIndex": 3, + "DocumentIndex": 12, "Title": "Contact.cs", "DocumentMoniker": "M:\\uv\\uWine\\uWine.Core.Domain\\Entities\\Contact.cs", "RelativeDocumentMoniker": "uWine.Core.Domain\\Entities\\Contact.cs", @@ -225,7 +329,7 @@ }, { "$type": "Document", - "DocumentIndex": 8, + "DocumentIndex": 16, "Title": "MariaDbContactRepository.cs", "DocumentMoniker": "M:\\uv\\uWine\\uWine.Core.Infrastructure\\Repository\\MariaDbContactRepository.cs", "RelativeDocumentMoniker": "uWine.Core.Infrastructure\\Repository\\MariaDbContactRepository.cs", @@ -238,7 +342,7 @@ }, { "$type": "Document", - "DocumentIndex": 13, + "DocumentIndex": 20, "Title": "IAddressRepository.cs", "DocumentMoniker": "M:\\uv\\uWine\\uWine.Core.Domain\\Repositories\\IAddressRepository.cs", "RelativeDocumentMoniker": "uWine.Core.Domain\\Repositories\\IAddressRepository.cs", @@ -246,23 +350,25 @@ "RelativeToolTip": "uWine.Core.Domain\\Repositories\\IAddressRepository.cs", "ViewState": "AgIAAAAAAAAAAAAAAAAAAAkAAAAAAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2025-07-04T13:30:13.643Z" + "WhenOpened": "2025-07-04T13:30:13.643Z", + "EditorCaption": "" }, { "$type": "Document", - "DocumentIndex": 14, + "DocumentIndex": 21, "Title": "Address.cs", "DocumentMoniker": "M:\\uv\\uWine\\uWine.Core.Domain\\Entities\\Address.cs", "RelativeDocumentMoniker": "uWine.Core.Domain\\Entities\\Address.cs", "ToolTip": "M:\\uv\\uWine\\uWine.Core.Domain\\Entities\\Address.cs", "RelativeToolTip": "uWine.Core.Domain\\Entities\\Address.cs", - "ViewState": "AgIAAAoAAAAAAAAAAAAkwAAAAAAAAAAAAAAAAA==", + "ViewState": "AgIAAAoAAAAAAAAAAAA5wAAAAAAAAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2025-07-04T12:44:44.188Z" + "WhenOpened": "2025-07-04T12:44:44.188Z", + "EditorCaption": "" }, { "$type": "Document", - "DocumentIndex": 9, + "DocumentIndex": 17, "Title": "MariaDbAddressRepository.cs", "DocumentMoniker": "M:\\uv\\uWine\\uWine.Core.Infrastructure\\Repository\\MariaDbAddressRepository.cs", "RelativeDocumentMoniker": "uWine.Core.Infrastructure\\Repository\\MariaDbAddressRepository.cs", @@ -275,7 +381,7 @@ }, { "$type": "Document", - "DocumentIndex": 15, + "DocumentIndex": 22, "Title": "RowWork.cs", "DocumentMoniker": "M:\\uv\\uWine\\uWine.Core.Domain\\Entities\\RowWork.cs", "RelativeDocumentMoniker": "uWine.Core.Domain\\Entities\\RowWork.cs", @@ -283,11 +389,12 @@ "RelativeToolTip": "uWine.Core.Domain\\Entities\\RowWork.cs", "ViewState": "AgIAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2025-07-03T10:09:09.455Z" + "WhenOpened": "2025-07-03T10:09:09.455Z", + "EditorCaption": "" }, { "$type": "Document", - "DocumentIndex": 17, + "DocumentIndex": 24, "Title": "WarehouseProduct.cs", "DocumentMoniker": "M:\\uv\\uWine\\uWine.Core.Domain\\Entities\\WarehouseProduct.cs", "RelativeDocumentMoniker": "uWine.Core.Domain\\Entities\\WarehouseProduct.cs", @@ -295,11 +402,12 @@ "RelativeToolTip": "uWine.Core.Domain\\Entities\\WarehouseProduct.cs", "ViewState": "AgIAAAAAAAAAAAAAAAAAAA4AAAA0AAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2025-07-03T10:07:37.406Z" + "WhenOpened": "2025-07-03T10:07:37.406Z", + "EditorCaption": "" }, { "$type": "Document", - "DocumentIndex": 16, + "DocumentIndex": 23, "Title": "ProductUsage.cs", "DocumentMoniker": "M:\\uv\\uWine\\uWine.Core.Domain\\Entities\\ProductUsage.cs", "RelativeDocumentMoniker": "uWine.Core.Domain\\Entities\\ProductUsage.cs", @@ -307,11 +415,12 @@ "RelativeToolTip": "uWine.Core.Domain\\Entities\\ProductUsage.cs", "ViewState": "AgIAAAAAAAAAAAAAAAAAABIAAAAAAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2025-07-03T10:07:00.42Z" + "WhenOpened": "2025-07-03T10:07:00.42Z", + "EditorCaption": "" }, { "$type": "Document", - "DocumentIndex": 5, + "DocumentIndex": 14, "Title": "Worker.cs", "DocumentMoniker": "M:\\uv\\uWine\\uWine.Core.Domain\\Entities\\Worker.cs", "RelativeDocumentMoniker": "uWine.Core.Domain\\Entities\\Worker.cs", @@ -324,7 +433,7 @@ }, { "$type": "Document", - "DocumentIndex": 4, + "DocumentIndex": 13, "Title": "PlantVariety.cs", "DocumentMoniker": "M:\\uv\\uWine\\uWine.Core.Domain\\Entities\\PlantVariety.cs", "RelativeDocumentMoniker": "uWine.Core.Domain\\Entities\\PlantVariety.cs", @@ -337,19 +446,20 @@ }, { "$type": "Document", - "DocumentIndex": 19, + "DocumentIndex": 9, "Title": "VinePlant.cs", "DocumentMoniker": "M:\\uv\\uWine\\uWine.Core.Domain\\Entities\\VinePlant.cs", "RelativeDocumentMoniker": "uWine.Core.Domain\\Entities\\VinePlant.cs", "ToolTip": "M:\\uv\\uWine\\uWine.Core.Domain\\Entities\\VinePlant.cs", "RelativeToolTip": "uWine.Core.Domain\\Entities\\VinePlant.cs", - "ViewState": "AgIAAAAAAAAAAAAAAAAAAA4AAAAbAAAAAAAAAA==", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAA0AAAAqAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2025-07-02T17:05:44.035Z" + "WhenOpened": "2025-07-02T17:05:44.035Z", + "EditorCaption": "" }, { "$type": "Document", - "DocumentIndex": 6, + "DocumentIndex": 15, "Title": "Vineyard.cs", "DocumentMoniker": "M:\\uv\\uWine\\uWine.Core.Domain\\Entities\\Vineyard.cs", "RelativeDocumentMoniker": "uWine.Core.Domain\\Entities\\Vineyard.cs", @@ -362,7 +472,7 @@ }, { "$type": "Document", - "DocumentIndex": 18, + "DocumentIndex": 25, "Title": "Row.cs", "DocumentMoniker": "M:\\uv\\uWine\\uWine.Core.Domain\\Entities\\Row.cs", "RelativeDocumentMoniker": "uWine.Core.Domain\\Entities\\Row.cs", @@ -370,7 +480,8 @@ "RelativeToolTip": "uWine.Core.Domain\\Entities\\Row.cs", "ViewState": "AgIAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2025-07-02T17:04:07.145Z" + "WhenOpened": "2025-07-02T17:04:07.145Z", + "EditorCaption": "" } ] } diff --git a/.vs/uWine/v17/DocumentLayout.json b/.vs/uWine/v17/DocumentLayout.json index eb307ae..d12b0a4 100644 --- a/.vs/uWine/v17/DocumentLayout.json +++ b/.vs/uWine/v17/DocumentLayout.json @@ -3,17 +3,53 @@ "WorkspaceRootPath": "M:\\uv\\uWine\\", "Documents": [ { - "AbsoluteMoniker": "D:0:0:{50360CEE-B38B-4729-ACA3-ABC3ED3538E9}|uWine.Core.Infrastructure\\uWine.Core.Infrastructure.csproj|m:\\uv\\uwine\\uwine.core.infrastructure\\services\\authenticationservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{50360CEE-B38B-4729-ACA3-ABC3ED3538E9}|uWine.Core.Infrastructure\\uWine.Core.Infrastructure.csproj|solutionrelative:uwine.core.infrastructure\\services\\authenticationservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + "AbsoluteMoniker": "D:0:0:{8E5D260E-7395-4875-8A4F-16205F92AD38}|uWine.Api\\uWine.Api.csproj|m:\\uv\\uwine\\uwine.api\\controllers\\testcontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{8E5D260E-7395-4875-8A4F-16205F92AD38}|uWine.Api\\uWine.Api.csproj|solutionrelative:uwine.api\\controllers\\testcontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{8E5D260E-7395-4875-8A4F-16205F92AD38}|uWine.Api\\uWine.Api.csproj|m:\\uv\\uwine\\uwine.api\\controllers\\usercontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{8E5D260E-7395-4875-8A4F-16205F92AD38}|uWine.Api\\uWine.Api.csproj|solutionrelative:uwine.api\\controllers\\usercontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{1DCFCDC3-C4A6-4864-8868-94AAB81C3DBA}|uWine.Core.Domain\\uWine.Core.Domain.csproj|m:\\uv\\uwine\\uwine.core.domain\\entities\\user.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{1DCFCDC3-C4A6-4864-8868-94AAB81C3DBA}|uWine.Core.Domain\\uWine.Core.Domain.csproj|solutionrelative:uwine.core.domain\\entities\\user.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" }, { "AbsoluteMoniker": "D:0:0:{50360CEE-B38B-4729-ACA3-ABC3ED3538E9}|uWine.Core.Infrastructure\\uWine.Core.Infrastructure.csproj|m:\\uv\\uwine\\uwine.core.infrastructure\\repository\\mariadbauthenticationrepository.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{50360CEE-B38B-4729-ACA3-ABC3ED3538E9}|uWine.Core.Infrastructure\\uWine.Core.Infrastructure.csproj|solutionrelative:uwine.core.infrastructure\\repository\\mariadbauthenticationrepository.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" }, + { + "AbsoluteMoniker": "D:0:0:{8E5D260E-7395-4875-8A4F-16205F92AD38}|uWine.Api\\uWine.Api.csproj|m:\\uv\\uwine\\uwine.api\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{8E5D260E-7395-4875-8A4F-16205F92AD38}|uWine.Api\\uWine.Api.csproj|solutionrelative:uwine.api\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{8E5D260E-7395-4875-8A4F-16205F92AD38}|uWine.Api\\uWine.Api.csproj|m:\\uv\\uwine\\uwine.api\\appsettings.json||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}", + "RelativeMoniker": "D:0:0:{8E5D260E-7395-4875-8A4F-16205F92AD38}|uWine.Api\\uWine.Api.csproj|solutionrelative:uwine.api\\appsettings.json||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}" + }, + { + "AbsoluteMoniker": "D:0:0:{50360CEE-B38B-4729-ACA3-ABC3ED3538E9}|uWine.Core.Infrastructure\\uWine.Core.Infrastructure.csproj|m:\\uv\\uwine\\uwine.core.infrastructure\\services\\authenticationservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{50360CEE-B38B-4729-ACA3-ABC3ED3538E9}|uWine.Core.Infrastructure\\uWine.Core.Infrastructure.csproj|solutionrelative:uwine.core.infrastructure\\services\\authenticationservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{1DCFCDC3-C4A6-4864-8868-94AAB81C3DBA}|uWine.Core.Domain\\uWine.Core.Domain.csproj|m:\\uv\\uwine\\uwine.core.domain\\entities\\role.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{1DCFCDC3-C4A6-4864-8868-94AAB81C3DBA}|uWine.Core.Domain\\uWine.Core.Domain.csproj|solutionrelative:uwine.core.domain\\entities\\role.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, { "AbsoluteMoniker": "D:0:0:{1DCFCDC3-C4A6-4864-8868-94AAB81C3DBA}|uWine.Core.Domain\\uWine.Core.Domain.csproj|m:\\uv\\uwine\\uwine.core.domain\\repositories\\iauthenticationrepository.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{1DCFCDC3-C4A6-4864-8868-94AAB81C3DBA}|uWine.Core.Domain\\uWine.Core.Domain.csproj|solutionrelative:uwine.core.domain\\repositories\\iauthenticationrepository.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" }, + { + "AbsoluteMoniker": "D:0:0:{1DCFCDC3-C4A6-4864-8868-94AAB81C3DBA}|uWine.Core.Domain\\uWine.Core.Domain.csproj|m:\\uv\\uwine\\uwine.core.domain\\entities\\vineplant.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{1DCFCDC3-C4A6-4864-8868-94AAB81C3DBA}|uWine.Core.Domain\\uWine.Core.Domain.csproj|solutionrelative:uwine.core.domain\\entities\\vineplant.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{50360CEE-B38B-4729-ACA3-ABC3ED3538E9}|uWine.Core.Infrastructure\\uWine.Core.Infrastructure.csproj|m:\\uv\\uwine\\uwine.core.infrastructure\\services\\ownerservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{50360CEE-B38B-4729-ACA3-ABC3ED3538E9}|uWine.Core.Infrastructure\\uWine.Core.Infrastructure.csproj|solutionrelative:uwine.core.infrastructure\\services\\ownerservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{1DCFCDC3-C4A6-4864-8868-94AAB81C3DBA}|uWine.Core.Domain\\uWine.Core.Domain.csproj|m:\\uv\\uwine\\uwine.core.domain\\entities\\owner.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{1DCFCDC3-C4A6-4864-8868-94AAB81C3DBA}|uWine.Core.Domain\\uWine.Core.Domain.csproj|solutionrelative:uwine.core.domain\\entities\\owner.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, { "AbsoluteMoniker": "D:0:0:{1DCFCDC3-C4A6-4864-8868-94AAB81C3DBA}|uWine.Core.Domain\\uWine.Core.Domain.csproj|m:\\uv\\uwine\\uwine.core.domain\\entities\\contact.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{1DCFCDC3-C4A6-4864-8868-94AAB81C3DBA}|uWine.Core.Domain\\uWine.Core.Domain.csproj|solutionrelative:uwine.core.domain\\entities\\contact.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" @@ -30,10 +66,6 @@ "AbsoluteMoniker": "D:0:0:{1DCFCDC3-C4A6-4864-8868-94AAB81C3DBA}|uWine.Core.Domain\\uWine.Core.Domain.csproj|m:\\uv\\uwine\\uwine.core.domain\\entities\\vineyard.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{1DCFCDC3-C4A6-4864-8868-94AAB81C3DBA}|uWine.Core.Domain\\uWine.Core.Domain.csproj|solutionrelative:uwine.core.domain\\entities\\vineyard.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" }, - { - "AbsoluteMoniker": "D:0:0:{50360CEE-B38B-4729-ACA3-ABC3ED3538E9}|uWine.Core.Infrastructure\\uWine.Core.Infrastructure.csproj|m:\\uv\\uwine\\uwine.core.infrastructure\\services\\ownerservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{50360CEE-B38B-4729-ACA3-ABC3ED3538E9}|uWine.Core.Infrastructure\\uWine.Core.Infrastructure.csproj|solutionrelative:uwine.core.infrastructure\\services\\ownerservice.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, { "AbsoluteMoniker": "D:0:0:{50360CEE-B38B-4729-ACA3-ABC3ED3538E9}|uWine.Core.Infrastructure\\uWine.Core.Infrastructure.csproj|m:\\uv\\uwine\\uwine.core.infrastructure\\repository\\mariadbcontactrepository.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{50360CEE-B38B-4729-ACA3-ABC3ED3538E9}|uWine.Core.Infrastructure\\uWine.Core.Infrastructure.csproj|solutionrelative:uwine.core.infrastructure\\repository\\mariadbcontactrepository.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" @@ -42,10 +74,6 @@ "AbsoluteMoniker": "D:0:0:{50360CEE-B38B-4729-ACA3-ABC3ED3538E9}|uWine.Core.Infrastructure\\uWine.Core.Infrastructure.csproj|m:\\uv\\uwine\\uwine.core.infrastructure\\repository\\mariadbaddressrepository.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{50360CEE-B38B-4729-ACA3-ABC3ED3538E9}|uWine.Core.Infrastructure\\uWine.Core.Infrastructure.csproj|solutionrelative:uwine.core.infrastructure\\repository\\mariadbaddressrepository.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" }, - { - "AbsoluteMoniker": "D:0:0:{8E5D260E-7395-4875-8A4F-16205F92AD38}|uWine.Api\\uWine.Api.csproj|m:\\uv\\uwine\\uwine.api\\controllers\\usercontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{8E5D260E-7395-4875-8A4F-16205F92AD38}|uWine.Api\\uWine.Api.csproj|solutionrelative:uwine.api\\controllers\\usercontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, { "AbsoluteMoniker": "D:0:0:{1DCFCDC3-C4A6-4864-8868-94AAB81C3DBA}|uWine.Core.Domain\\uWine.Core.Domain.csproj|m:\\uv\\uwine\\uwine.core.domain\\entities\\contacttype.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{1DCFCDC3-C4A6-4864-8868-94AAB81C3DBA}|uWine.Core.Domain\\uWine.Core.Domain.csproj|solutionrelative:uwine.core.domain\\entities\\contacttype.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" @@ -77,10 +105,6 @@ { "AbsoluteMoniker": "D:0:0:{1DCFCDC3-C4A6-4864-8868-94AAB81C3DBA}|uWine.Core.Domain\\uWine.Core.Domain.csproj|m:\\uv\\uwine\\uwine.core.domain\\entities\\row.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", "RelativeMoniker": "D:0:0:{1DCFCDC3-C4A6-4864-8868-94AAB81C3DBA}|uWine.Core.Domain\\uWine.Core.Domain.csproj|solutionrelative:uwine.core.domain\\entities\\row.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" - }, - { - "AbsoluteMoniker": "D:0:0:{1DCFCDC3-C4A6-4864-8868-94AAB81C3DBA}|uWine.Core.Domain\\uWine.Core.Domain.csproj|m:\\uv\\uwine\\uwine.core.domain\\entities\\vineplant.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", - "RelativeMoniker": "D:0:0:{1DCFCDC3-C4A6-4864-8868-94AAB81C3DBA}|uWine.Core.Domain\\uWine.Core.Domain.csproj|solutionrelative:uwine.core.domain\\entities\\vineplant.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" } ], "DocumentGroupContainers": [ @@ -90,104 +114,155 @@ "DocumentGroups": [ { "DockedWidth": 200, - "SelectedChildIndex": 9, + "SelectedChildIndex": 3, "Children": [ { - "$type": "Bookmark", - "Name": "ST:0:0:{d78612c7-9962-4b83-95d9-268046dad23a}" + "$type": "Document", + "DocumentIndex": 1, + "Title": "UserController.cs", + "DocumentMoniker": "M:\\uv\\uWine\\uWine.Api\\Controllers\\UserController.cs", + "RelativeDocumentMoniker": "uWine.Api\\Controllers\\UserController.cs", + "ToolTip": "M:\\uv\\uWine\\uWine.Api\\Controllers\\UserController.cs", + "RelativeToolTip": "uWine.Api\\Controllers\\UserController.cs", + "ViewState": "AgIAADcAAAAAAAAAAAAswD8AAAAdAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-07-05T12:49:48.611Z", + "IsPinned": true, + "EditorCaption": "" }, { - "$type": "Bookmark", - "Name": "ST:134:0:{1fc202d4-d401-403c-9834-5b218574bb67}" - }, - { - "$type": "Bookmark", - "Name": "ST:134:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}" - }, - { - "$type": "Bookmark", - "Name": "ST:135:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}" - }, - { - "$type": "Bookmark", - "Name": "ST:130:0:{1fc202d4-d401-403c-9834-5b218574bb67}" - }, - { - "$type": "Bookmark", - "Name": "ST:131:0:{1fc202d4-d401-403c-9834-5b218574bb67}" - }, - { - "$type": "Bookmark", - "Name": "ST:0:0:{004be353-6879-467c-9d1e-9ac23cdf6d49}" + "$type": "Document", + "DocumentIndex": 7, + "Title": "Role.cs", + "DocumentMoniker": "M:\\uv\\uWine\\uWine.Core.Domain\\Entities\\Role.cs", + "RelativeDocumentMoniker": "uWine.Core.Domain\\Entities\\Role.cs", + "ToolTip": "M:\\uv\\uWine\\uWine.Core.Domain\\Entities\\Role.cs", + "RelativeToolTip": "uWine.Core.Domain\\Entities\\Role.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAA4AAAArAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-07-09T15:32:58.964Z", + "EditorCaption": "" }, { "$type": "Document", "DocumentIndex": 2, + "Title": "User.cs", + "DocumentMoniker": "M:\\uv\\uWine\\uWine.Core.Domain\\Entities\\User.cs", + "RelativeDocumentMoniker": "uWine.Core.Domain\\Entities\\User.cs", + "ToolTip": "M:\\uv\\uWine\\uWine.Core.Domain\\Entities\\User.cs", + "RelativeToolTip": "uWine.Core.Domain\\Entities\\User.cs", + "ViewState": "AgIAAAwAAAAAAAAAAAAowAwAAAAbAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-07-09T15:30:48.881Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 0, + "Title": "TestController.cs", + "DocumentMoniker": "M:\\uv\\uWine\\uWine.Api\\Controllers\\TestController.cs", + "RelativeDocumentMoniker": "uWine.Api\\Controllers\\TestController.cs", + "ToolTip": "M:\\uv\\uWine\\uWine.Api\\Controllers\\TestController.cs", + "RelativeToolTip": "uWine.Api\\Controllers\\TestController.cs", + "ViewState": "AgIAAAsAAAAAAAAAAAA7wBoAAABAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-07-09T14:20:34.76Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 11, + "Title": "Owner.cs", + "DocumentMoniker": "M:\\uv\\uWine\\uWine.Core.Domain\\Entities\\Owner.cs", + "RelativeDocumentMoniker": "uWine.Core.Domain\\Entities\\Owner.cs", + "ToolTip": "M:\\uv\\uWine\\uWine.Core.Domain\\Entities\\Owner.cs", + "RelativeToolTip": "uWine.Core.Domain\\Entities\\Owner.cs", + "ViewState": "AgIAAAsAAAAAAAAAAIA7wB0AAAABAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-07-09T14:14:45.554Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 4, + "Title": "Program.cs", + "DocumentMoniker": "M:\\uv\\uWine\\uWine.Api\\Program.cs", + "RelativeDocumentMoniker": "uWine.Api\\Program.cs", + "ToolTip": "M:\\uv\\uWine\\uWine.Api\\Program.cs", + "RelativeToolTip": "uWine.Api\\Program.cs", + "ViewState": "AgIAABkAAAAAAAAAAAAmwCoAAABDAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-07-09T14:07:06.764Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 5, + "Title": "appsettings.json", + "DocumentMoniker": "M:\\uv\\uWine\\uWine.Api\\appsettings.json", + "RelativeDocumentMoniker": "uWine.Api\\appsettings.json", + "ToolTip": "M:\\uv\\uWine\\uWine.Api\\appsettings.json", + "RelativeToolTip": "uWine.Api\\appsettings.json", + "ViewState": "AgIAAAAAAAAAAAAAAAAAABIAAAAeAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001642|", + "WhenOpened": "2025-07-09T14:06:21.768Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 8, "Title": "IAuthenticationRepository.cs", "DocumentMoniker": "M:\\uv\\uWine\\uWine.Core.Domain\\Repositories\\IAuthenticationRepository.cs", "RelativeDocumentMoniker": "uWine.Core.Domain\\Repositories\\IAuthenticationRepository.cs", "ToolTip": "M:\\uv\\uWine\\uWine.Core.Domain\\Repositories\\IAuthenticationRepository.cs", "RelativeToolTip": "uWine.Core.Domain\\Repositories\\IAuthenticationRepository.cs", - "ViewState": "AgIAAAAAAAAAAAAAAAAAAAgAAAAFAAAAAAAAAA==", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAkAAAAFAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2025-07-06T19:32:07.448Z", "EditorCaption": "" }, { "$type": "Document", - "DocumentIndex": 1, + "DocumentIndex": 3, "Title": "MariaDbAuthenticationRepository.cs", "DocumentMoniker": "M:\\uv\\uWine\\uWine.Core.Infrastructure\\Repository\\MariaDbAuthenticationRepository.cs", "RelativeDocumentMoniker": "uWine.Core.Infrastructure\\Repository\\MariaDbAuthenticationRepository.cs", "ToolTip": "M:\\uv\\uWine\\uWine.Core.Infrastructure\\Repository\\MariaDbAuthenticationRepository.cs", "RelativeToolTip": "uWine.Core.Infrastructure\\Repository\\MariaDbAuthenticationRepository.cs", - "ViewState": "AgIAAAgAAAAAAAAAAAAAwAwAAAABAAAAAAAAAA==", + "ViewState": "AgIAADEAAAAAAAAAAAAswDwAAAAnAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2025-07-05T13:17:22.615Z", "EditorCaption": "" }, { "$type": "Document", - "DocumentIndex": 0, + "DocumentIndex": 6, "Title": "AuthenticationService.cs", "DocumentMoniker": "M:\\uv\\uWine\\uWine.Core.Infrastructure\\Services\\AuthenticationService.cs", "RelativeDocumentMoniker": "uWine.Core.Infrastructure\\Services\\AuthenticationService.cs", "ToolTip": "M:\\uv\\uWine\\uWine.Core.Infrastructure\\Services\\AuthenticationService.cs", "RelativeToolTip": "uWine.Core.Infrastructure\\Services\\AuthenticationService.cs", - "ViewState": "AgIAAAMAAAAAAAAAAAAAABUAAAA5AAAAAAAAAA==", + "ViewState": "AgIAAAMAAAAAAAAAAAAAABoAAAA+AAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2025-07-05T13:13:38.382Z", "EditorCaption": "" }, { "$type": "Document", - "DocumentIndex": 7, + "DocumentIndex": 10, "Title": "OwnerService.cs", "DocumentMoniker": "M:\\uv\\uWine\\uWine.Core.Infrastructure\\Services\\OwnerService.cs", "RelativeDocumentMoniker": "uWine.Core.Infrastructure\\Services\\OwnerService.cs", "ToolTip": "M:\\uv\\uWine\\uWine.Core.Infrastructure\\Services\\OwnerService.cs", "RelativeToolTip": "uWine.Core.Infrastructure\\Services\\OwnerService.cs", - "ViewState": "AgIAAAsAAAAAAAAAAAAUwCQAAAAVAAAAAAAAAA==", + "ViewState": "AgIAABcAAAAAAAAAAAAqwCQAAAAAAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2025-07-05T12:53:14.567Z", "EditorCaption": "" }, { "$type": "Document", - "DocumentIndex": 10, - "Title": "UserController.cs", - "DocumentMoniker": "M:\\uv\\uWine\\uWine.Api\\Controllers\\UserController.cs", - "RelativeDocumentMoniker": "uWine.Api\\Controllers\\UserController.cs", - "ToolTip": "M:\\uv\\uWine\\uWine.Api\\Controllers\\UserController.cs", - "RelativeToolTip": "uWine.Api\\Controllers\\UserController.cs", - "ViewState": "AgIAAAAAAAAAAAAAAAAAAAsAAAAJAAAAAAAAAA==", - "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2025-07-05T12:49:48.611Z", - "EditorCaption": "" - }, - { - "$type": "Document", - "DocumentIndex": 12, + "DocumentIndex": 19, "Title": "IContactRepository.cs", "DocumentMoniker": "M:\\uv\\uWine\\uWine.Core.Domain\\Repositories\\IContactRepository.cs", "RelativeDocumentMoniker": "uWine.Core.Domain\\Repositories\\IContactRepository.cs", @@ -200,7 +275,7 @@ }, { "$type": "Document", - "DocumentIndex": 11, + "DocumentIndex": 18, "Title": "ContactType.cs", "DocumentMoniker": "M:\\uv\\uWine\\uWine.Core.Domain\\Entities\\ContactType.cs", "RelativeDocumentMoniker": "uWine.Core.Domain\\Entities\\ContactType.cs", @@ -208,11 +283,12 @@ "RelativeToolTip": "uWine.Core.Domain\\Entities\\ContactType.cs", "ViewState": "AgIAAAAAAAAAAAAAAAAuwAIAAAARAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2025-07-04T14:33:37.163Z" + "WhenOpened": "2025-07-04T14:33:37.163Z", + "EditorCaption": "" }, { "$type": "Document", - "DocumentIndex": 3, + "DocumentIndex": 12, "Title": "Contact.cs", "DocumentMoniker": "M:\\uv\\uWine\\uWine.Core.Domain\\Entities\\Contact.cs", "RelativeDocumentMoniker": "uWine.Core.Domain\\Entities\\Contact.cs", @@ -225,7 +301,7 @@ }, { "$type": "Document", - "DocumentIndex": 8, + "DocumentIndex": 16, "Title": "MariaDbContactRepository.cs", "DocumentMoniker": "M:\\uv\\uWine\\uWine.Core.Infrastructure\\Repository\\MariaDbContactRepository.cs", "RelativeDocumentMoniker": "uWine.Core.Infrastructure\\Repository\\MariaDbContactRepository.cs", @@ -238,7 +314,7 @@ }, { "$type": "Document", - "DocumentIndex": 13, + "DocumentIndex": 20, "Title": "IAddressRepository.cs", "DocumentMoniker": "M:\\uv\\uWine\\uWine.Core.Domain\\Repositories\\IAddressRepository.cs", "RelativeDocumentMoniker": "uWine.Core.Domain\\Repositories\\IAddressRepository.cs", @@ -246,23 +322,25 @@ "RelativeToolTip": "uWine.Core.Domain\\Repositories\\IAddressRepository.cs", "ViewState": "AgIAAAAAAAAAAAAAAAAAAAkAAAAAAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2025-07-04T13:30:13.643Z" + "WhenOpened": "2025-07-04T13:30:13.643Z", + "EditorCaption": "" }, { "$type": "Document", - "DocumentIndex": 14, + "DocumentIndex": 21, "Title": "Address.cs", "DocumentMoniker": "M:\\uv\\uWine\\uWine.Core.Domain\\Entities\\Address.cs", "RelativeDocumentMoniker": "uWine.Core.Domain\\Entities\\Address.cs", "ToolTip": "M:\\uv\\uWine\\uWine.Core.Domain\\Entities\\Address.cs", "RelativeToolTip": "uWine.Core.Domain\\Entities\\Address.cs", - "ViewState": "AgIAAAoAAAAAAAAAAAAkwAAAAAAAAAAAAAAAAA==", + "ViewState": "AgIAAAoAAAAAAAAAAAA5wAAAAAAAAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2025-07-04T12:44:44.188Z" + "WhenOpened": "2025-07-04T12:44:44.188Z", + "EditorCaption": "" }, { "$type": "Document", - "DocumentIndex": 9, + "DocumentIndex": 17, "Title": "MariaDbAddressRepository.cs", "DocumentMoniker": "M:\\uv\\uWine\\uWine.Core.Infrastructure\\Repository\\MariaDbAddressRepository.cs", "RelativeDocumentMoniker": "uWine.Core.Infrastructure\\Repository\\MariaDbAddressRepository.cs", @@ -275,7 +353,7 @@ }, { "$type": "Document", - "DocumentIndex": 15, + "DocumentIndex": 22, "Title": "RowWork.cs", "DocumentMoniker": "M:\\uv\\uWine\\uWine.Core.Domain\\Entities\\RowWork.cs", "RelativeDocumentMoniker": "uWine.Core.Domain\\Entities\\RowWork.cs", @@ -283,11 +361,12 @@ "RelativeToolTip": "uWine.Core.Domain\\Entities\\RowWork.cs", "ViewState": "AgIAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2025-07-03T10:09:09.455Z" + "WhenOpened": "2025-07-03T10:09:09.455Z", + "EditorCaption": "" }, { "$type": "Document", - "DocumentIndex": 17, + "DocumentIndex": 24, "Title": "WarehouseProduct.cs", "DocumentMoniker": "M:\\uv\\uWine\\uWine.Core.Domain\\Entities\\WarehouseProduct.cs", "RelativeDocumentMoniker": "uWine.Core.Domain\\Entities\\WarehouseProduct.cs", @@ -295,11 +374,12 @@ "RelativeToolTip": "uWine.Core.Domain\\Entities\\WarehouseProduct.cs", "ViewState": "AgIAAAAAAAAAAAAAAAAAAA4AAAA0AAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2025-07-03T10:07:37.406Z" + "WhenOpened": "2025-07-03T10:07:37.406Z", + "EditorCaption": "" }, { "$type": "Document", - "DocumentIndex": 16, + "DocumentIndex": 23, "Title": "ProductUsage.cs", "DocumentMoniker": "M:\\uv\\uWine\\uWine.Core.Domain\\Entities\\ProductUsage.cs", "RelativeDocumentMoniker": "uWine.Core.Domain\\Entities\\ProductUsage.cs", @@ -307,11 +387,12 @@ "RelativeToolTip": "uWine.Core.Domain\\Entities\\ProductUsage.cs", "ViewState": "AgIAAAAAAAAAAAAAAAAAABIAAAAAAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2025-07-03T10:07:00.42Z" + "WhenOpened": "2025-07-03T10:07:00.42Z", + "EditorCaption": "" }, { "$type": "Document", - "DocumentIndex": 5, + "DocumentIndex": 14, "Title": "Worker.cs", "DocumentMoniker": "M:\\uv\\uWine\\uWine.Core.Domain\\Entities\\Worker.cs", "RelativeDocumentMoniker": "uWine.Core.Domain\\Entities\\Worker.cs", @@ -324,7 +405,7 @@ }, { "$type": "Document", - "DocumentIndex": 4, + "DocumentIndex": 13, "Title": "PlantVariety.cs", "DocumentMoniker": "M:\\uv\\uWine\\uWine.Core.Domain\\Entities\\PlantVariety.cs", "RelativeDocumentMoniker": "uWine.Core.Domain\\Entities\\PlantVariety.cs", @@ -337,19 +418,20 @@ }, { "$type": "Document", - "DocumentIndex": 19, + "DocumentIndex": 9, "Title": "VinePlant.cs", "DocumentMoniker": "M:\\uv\\uWine\\uWine.Core.Domain\\Entities\\VinePlant.cs", "RelativeDocumentMoniker": "uWine.Core.Domain\\Entities\\VinePlant.cs", "ToolTip": "M:\\uv\\uWine\\uWine.Core.Domain\\Entities\\VinePlant.cs", "RelativeToolTip": "uWine.Core.Domain\\Entities\\VinePlant.cs", - "ViewState": "AgIAAAAAAAAAAAAAAAAAAA4AAAAbAAAAAAAAAA==", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAA0AAAAqAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2025-07-02T17:05:44.035Z" + "WhenOpened": "2025-07-02T17:05:44.035Z", + "EditorCaption": "" }, { "$type": "Document", - "DocumentIndex": 6, + "DocumentIndex": 15, "Title": "Vineyard.cs", "DocumentMoniker": "M:\\uv\\uWine\\uWine.Core.Domain\\Entities\\Vineyard.cs", "RelativeDocumentMoniker": "uWine.Core.Domain\\Entities\\Vineyard.cs", @@ -362,7 +444,7 @@ }, { "$type": "Document", - "DocumentIndex": 18, + "DocumentIndex": 25, "Title": "Row.cs", "DocumentMoniker": "M:\\uv\\uWine\\uWine.Core.Domain\\Entities\\Row.cs", "RelativeDocumentMoniker": "uWine.Core.Domain\\Entities\\Row.cs", @@ -370,7 +452,8 @@ "RelativeToolTip": "uWine.Core.Domain\\Entities\\Row.cs", "ViewState": "AgIAAAAAAAAAAAAAAAAAABEAAAAAAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", - "WhenOpened": "2025-07-02T17:04:07.145Z" + "WhenOpened": "2025-07-02T17:04:07.145Z", + "EditorCaption": "" } ] } diff --git a/uWine.Api/Controllers/TestController.cs b/uWine.Api/Controllers/TestController.cs new file mode 100644 index 0000000..2833d90 --- /dev/null +++ b/uWine.Api/Controllers/TestController.cs @@ -0,0 +1,32 @@ +using Microsoft.AspNetCore.Mvc; +using System.Security.Claims; + +namespace uWine.Api.Controllers +{ + [ApiController] + [Route("/[controller]")] + public class TestController : Controller + { + private readonly IConfiguration _configuration; + + public TestController(IConfiguration configuration) { + _configuration = configuration; + } + [HttpGet("cklogin")] + public IActionResult test() + { + try + { + var TUserId = User.FindFirst(ClaimTypes.NameIdentifier)?.Value; + var userId = User.FindFirst("userId").Value; + var role = User.FindFirst(ClaimTypes.Role)?.Value; + return Ok(new { userId, TUserId, role }); + } + catch + { + return Unauthorized("\"title\": \"Unauthorized\""); + } + } + + } +} diff --git a/uWine.Api/Controllers/UserController.cs b/uWine.Api/Controllers/UserController.cs index 76f155e..ced5f2d 100644 --- a/uWine.Api/Controllers/UserController.cs +++ b/uWine.Api/Controllers/UserController.cs @@ -1,14 +1,83 @@ using Microsoft.AspNetCore.Mvc; +using Microsoft.IdentityModel.Tokens; +using System.IdentityModel.Tokens.Jwt; +using System.Security.Claims; +using System.Text; +using uWine.Core.Domain.Entities; +using uWine.Core.Infrastructure.Services; namespace uWine.Api.Controllers { [ApiController] - [Route("/login/")] + [Route("/[controller]")] public class UserController : Controller { - public IActionResult Index() + private readonly IConfiguration _configuration; + readonly AuthenticationService _authenticationService; + public UserController(IConfiguration configuration, AuthenticationService authenticationService) { - return View(); + _configuration = configuration; + _authenticationService = authenticationService; + } + //public IActionResult Index() + //{ + // return View(); + //} + + [HttpGet("login")] + public IActionResult LoginWithBasic() + { + if (!Request.Headers.ContainsKey("Authorization")) + return Unauthorized("Authorization header missing"); + + var authHeader = Request.Headers["Authorization"].ToString(); + + if (!authHeader.StartsWith("Basic ")) + return Unauthorized("Invalid auth scheme"); + + var encodedCredentials = authHeader.Substring("Basic ".Length).Trim(); + var decodedBytes = Convert.FromBase64String(encodedCredentials); + var decodedCredentials = Encoding.UTF8.GetString(decodedBytes); + + var parts = decodedCredentials.Split(':', 2); + if (parts.Length != 2) + return Unauthorized("Invalid credentials format"); + var user = new User { Username = parts[0], Password = parts[1] }; + var auth = _authenticationService.IsAuthenticated(user); + + // 🔐 Autenticazione fittizia (da sostituire con verifica DB) + if (!auth) + return Unauthorized("Credenziali non valide"); + + user = _authenticationService.User(user); + + var token = GenerateJwtToken(user); + return Ok(new { access_token = token }); + } + + + private string GenerateJwtToken(User user) + { + var jwtSettings = _configuration.GetSection("JwtSettings"); + var claims = new[] + { + new Claim("userId", user.Id.ToString()), + new Claim(ClaimTypes.NameIdentifier, Guid.NewGuid().ToString()), + new Claim(ClaimTypes.Role, user.Role.Id.ToString()) + }; + + var key = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(jwtSettings["Secret"])); + var creds = new SigningCredentials(key, SecurityAlgorithms.HmacSha256); + + var token = new JwtSecurityToken( + issuer: jwtSettings["Issuer"], + audience: jwtSettings["Audience"], + claims: claims, + expires: DateTime.UtcNow.AddMinutes(Convert.ToDouble(jwtSettings["ExpiresInMinutes"])), + signingCredentials: creds + ); + + return new JwtSecurityTokenHandler().WriteToken(token); } } } diff --git a/uWine.Api/Program.cs b/uWine.Api/Program.cs index d2926ce..fd3069f 100644 --- a/uWine.Api/Program.cs +++ b/uWine.Api/Program.cs @@ -1,4 +1,11 @@ +using Microsoft.AspNetCore.Authentication.JwtBearer; +using Microsoft.IdentityModel.Tokens; +using System.Text; +using uWine.Core.Domain.Repositories; +using uWine.Core.Infrastructure.Repository; +using uWine.Core.Infrastructure.Services; + namespace uWine.Api { public class Program @@ -7,13 +14,35 @@ namespace uWine.Api { var builder = WebApplication.CreateBuilder(args); - // Add services to the container. + builder.Services.AddAuthentication(options => + { + options.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme; + options.DefaultChallengeScheme = JwtBearerDefaults.AuthenticationScheme; + }) + .AddJwtBearer(options => + { + var jwtSettings = builder.Configuration.GetSection("JwtSettings"); + options.TokenValidationParameters = new TokenValidationParameters + { + ValidateIssuer = true, + ValidateAudience = true, + ValidateLifetime = true, + ValidateIssuerSigningKey = true, + ValidIssuer = jwtSettings["Issuer"], + ValidAudience = jwtSettings["Audience"], + IssuerSigningKey = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(jwtSettings["Secret"])) + }; + }); builder.Services.AddControllers(); // Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle builder.Services.AddEndpointsApiExplorer(); builder.Services.AddSwaggerGen(); + builder.Services.AddTransient(); + builder.Services.AddTransient(); + //builder.Services.AddSingleton(); + var app = builder.Build(); // Configure the HTTP request pipeline. diff --git a/uWine.Api/appsettings.json b/uWine.Api/appsettings.json index 10f68b8..b49d850 100644 --- a/uWine.Api/appsettings.json +++ b/uWine.Api/appsettings.json @@ -5,5 +5,18 @@ "Microsoft.AspNetCore": "Warning" } }, - "AllowedHosts": "*" + "AllowedHosts": "*", + "JwtSettings": { + "Secret": "questa-chiave-deve-essere-lunga-e-sicura", + "Issuer": "IlTuoPortaleAPI", + "Audience": "IlTuoClientApp", + "ExpiresInMinutes": 60 + }, + "db": { + "mariaDbServer": "192.168.0.7", + "mariaDbSchema": "uvineyard", + "mariaDbUser": "administrator", + "mariaDbPassword": "123456", + "mariaDbPoolSize": 100 + } } diff --git a/uWine.Api/uWine.Api.csproj b/uWine.Api/uWine.Api.csproj index 9daa180..aeac2f0 100644 --- a/uWine.Api/uWine.Api.csproj +++ b/uWine.Api/uWine.Api.csproj @@ -7,7 +7,13 @@ + + + + + + diff --git a/uWine.Core.Domain/Entities/Owner.cs b/uWine.Core.Domain/Entities/Owner.cs index e4b9c65..8bb645f 100644 --- a/uWine.Core.Domain/Entities/Owner.cs +++ b/uWine.Core.Domain/Entities/Owner.cs @@ -26,4 +26,5 @@ Note = reader.GetString("note") }; } + } } diff --git a/uWine.Core.Domain/Entities/Role.cs b/uWine.Core.Domain/Entities/Role.cs index 2061674..5425585 100644 --- a/uWine.Core.Domain/Entities/Role.cs +++ b/uWine.Core.Domain/Entities/Role.cs @@ -1,9 +1,21 @@ -namespace uWine.Core.Domain.Entities +using MySqlConnector; + +namespace uWine.Core.Domain.Entities { public class Role { public int Id { get; set; } public string Name { get; set; } public string Description { get; set; } + + public static Role FromRecord(MySqlDataReader reader) + { + return new Role + { + Id = reader.GetInt32("role_id"), + Name = reader.GetString("name"), + Description = reader.GetString("description") + }; + } } } diff --git a/uWine.Core.Domain/Entities/User.cs b/uWine.Core.Domain/Entities/User.cs index 7e7fa49..6aa0d8f 100644 --- a/uWine.Core.Domain/Entities/User.cs +++ b/uWine.Core.Domain/Entities/User.cs @@ -1,4 +1,6 @@ -namespace uWine.Core.Domain.Entities +using MySqlConnector; + +namespace uWine.Core.Domain.Entities { public class User { @@ -8,5 +10,14 @@ public Role Role { get; set; } public bool Active { get; set; } public List Owners { get; set; } + public static User LoginUser(MySqlDataReader reader) + { + return new User + { + Id = reader.GetInt32("id"), + Username = reader.GetString("username"), + Role = Role.FromRecord(reader), + }; + } } } diff --git a/uWine.Core.Domain/Repositories/IAuthenticationRepository.cs b/uWine.Core.Domain/Repositories/IAuthenticationRepository.cs index 83119c5..1f1b95d 100644 --- a/uWine.Core.Domain/Repositories/IAuthenticationRepository.cs +++ b/uWine.Core.Domain/Repositories/IAuthenticationRepository.cs @@ -6,5 +6,6 @@ namespace uWine.Core.Domain.Repositories public interface IAuthenticationRepository { bool Valid(User user); + User LoggedUser(User user); } } \ No newline at end of file diff --git a/uWine.Core.Domain/obj/Debug/net8.0/uWine.Core.Domain.AssemblyInfo.cs b/uWine.Core.Domain/obj/Debug/net8.0/uWine.Core.Domain.AssemblyInfo.cs index 47d505d..82afa8c 100644 --- a/uWine.Core.Domain/obj/Debug/net8.0/uWine.Core.Domain.AssemblyInfo.cs +++ b/uWine.Core.Domain/obj/Debug/net8.0/uWine.Core.Domain.AssemblyInfo.cs @@ -14,7 +14,7 @@ using System.Reflection; [assembly: System.Reflection.AssemblyCompanyAttribute("uWine.Core.Domain")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] -[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+7941a858fdaae67757b9b4caff965d2721e9b28d")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+a172f05269c07a86949730b68f466dbb39efd35c")] [assembly: System.Reflection.AssemblyProductAttribute("uWine.Core.Domain")] [assembly: System.Reflection.AssemblyTitleAttribute("uWine.Core.Domain")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] diff --git a/uWine.Core.Domain/obj/Debug/net8.0/uWine.Core.Domain.AssemblyInfoInputs.cache b/uWine.Core.Domain/obj/Debug/net8.0/uWine.Core.Domain.AssemblyInfoInputs.cache index f9eff68..d8519ce 100644 --- a/uWine.Core.Domain/obj/Debug/net8.0/uWine.Core.Domain.AssemblyInfoInputs.cache +++ b/uWine.Core.Domain/obj/Debug/net8.0/uWine.Core.Domain.AssemblyInfoInputs.cache @@ -1 +1 @@ -d2610517bddbb48769c9f8f62bd9f8107a8dab356a5412c7a5c3dfc9b3ba2edd +8b28d92b53d240bb0fa1329b33b29da5b306fb49220cf2f4e3d5082767ed6f9b diff --git a/uWine.Core.Infrastructure/Repository/MariaDbAuthenticationRepository.cs b/uWine.Core.Infrastructure/Repository/MariaDbAuthenticationRepository.cs index 78bda1f..d533b6e 100644 --- a/uWine.Core.Infrastructure/Repository/MariaDbAuthenticationRepository.cs +++ b/uWine.Core.Infrastructure/Repository/MariaDbAuthenticationRepository.cs @@ -22,10 +22,11 @@ namespace uWine.Core.Infrastructure.Repository if (user == null || string.IsNullOrEmpty(user.Username) || string.IsNullOrEmpty(user.Password)) return false; using (var conn = Connection()) { - var cmd = new MySqlCommand("sp_check_login", conn); + conn.Open(); + var cmd = new MySqlCommand("sp_login_user", conn); cmd.CommandType = CommandType.StoredProcedure; - cmd.Parameters.AddWithValue("@Username", user.Username); - cmd.Parameters.AddWithValue("@Password", user.Password); + cmd.Parameters.AddWithValue("@IN_username", user.Username); + cmd.Parameters.AddWithValue("@IN_password", user.Password); using (var reader = cmd.ExecuteReader()) { if (reader.Read()) @@ -36,5 +37,33 @@ namespace uWine.Core.Infrastructure.Repository } return false; } + + public User LoggedUser(User user) + { + using (var conn = Connection()) + { + conn.Open(); + var cmd = new MySqlCommand($@"SELECT u.id, + username, + u.role as role_id, + r.role as name, + description + FROM t_users u + JOIN t_role r on r.id = u.role + WHERE username = @username AND active = 1 AND + password = SHA2(CONCAT(@password, salt), 512)", conn); + cmd.Parameters.AddWithValue("username", user.Username); + cmd.Parameters.AddWithValue ("password", user.Password); + using( var reader = cmd.ExecuteReader()) + { + if (reader.Read()) + { + return User.LoginUser(reader); + } + + } + } + return new User(); + } } } diff --git a/uWine.Core.Infrastructure/Services/AuthenticationService.cs b/uWine.Core.Infrastructure/Services/AuthenticationService.cs index 46afc30..de5e87a 100644 --- a/uWine.Core.Infrastructure/Services/AuthenticationService.cs +++ b/uWine.Core.Infrastructure/Services/AuthenticationService.cs @@ -21,5 +21,10 @@ namespace uWine.Core.Infrastructure.Services { return _authenticationRepository.Valid(user); } + + public User User(User user) + { + return _authenticationRepository.LoggedUser(user); + } } } diff --git a/uWine.Core.Infrastructure/Services/OwnerService.cs b/uWine.Core.Infrastructure/Services/OwnerService.cs index 20a97c7..25f9707 100644 --- a/uWine.Core.Infrastructure/Services/OwnerService.cs +++ b/uWine.Core.Infrastructure/Services/OwnerService.cs @@ -16,9 +16,9 @@ namespace uWine.Core.Infrastructure.Services IVineyardRepository _vineyardRepository; public OwnerService( - IOwnerRepository ownerRepository, - IAddressRepository addressRepository, - IContactRepository contactRepository, + IOwnerRepository ownerRepository, + IAddressRepository addressRepository, + IContactRepository contactRepository, IVineyardRepository vineyardRepository ) { @@ -28,9 +28,16 @@ namespace uWine.Core.Infrastructure.Services _vineyardRepository = vineyardRepository; } + public Owner Owner(int ownerId) + { + var owner = _ownerRepository.Simple(ownerId); + owner = FillData(owner); + return owner; + } + public Owner FillData(Owner owner) { - owner.Addresses =_addressRepository.OwnerAddresses(owner.Id); + owner.Addresses = _addressRepository.OwnerAddresses(owner.Id); owner.Contacts = _contactRepository.OwnerContacts(owner.Id); owner.Vineyards = _vineyardRepository.GetOwnerVineyards(owner.Id);