diff --git a/.github/workflows/dotnet-format-action.yml b/.github/workflows/dotnet-format-action.yml index ac4fe2a..8f71901 100644 --- a/.github/workflows/dotnet-format-action.yml +++ b/.github/workflows/dotnet-format-action.yml @@ -13,7 +13,9 @@ jobs: uses: actions/setup-dotnet@v3 with: dotnet-version: | + 6.0.x 7.0.x + 8.0.x - name: Run dotnet format id: format uses: jfversluis/dotnet-format@v1.0.5 diff --git a/.github/workflows/dotnet-linux-client.yml b/.github/workflows/dotnet-linux-client.yml index 9e8b5a2..c29f550 100644 --- a/.github/workflows/dotnet-linux-client.yml +++ b/.github/workflows/dotnet-linux-client.yml @@ -15,7 +15,26 @@ jobs: uses: actions/setup-dotnet@v3 with: dotnet-version: | + 6.0.x 7.0.x + 8.0.x + - name: Clone and run Authentication + run: | + git clone https://github.com/EasyMicroservices/Authentications-Microservice.git + cd Authentications-Microservice + dotnet run --project src/CSharp/EasyMicroservices.AuthenticationsMicroservice.WebApi/EasyMicroservices.AuthenticationsMicroservice.WebApi.csproj & + AUTH_PID=$! + echo "Started Authentication Service with PID $AUTH_PID" + cd .. + shell: bash + - name: Clone and run WhiteLabel + run: | + git clone https://github.com/EasyMicroservices/WhiteLabels-Microservice.git + cd WhiteLabels-Microservice + dotnet run --project src/CSharp/EasyMicroservices.WhiteLabelsMicroservice.WebApi/EasyMicroservices.WhiteLabelsMicroservice.WebApi.csproj & + WHITELABEL_PID=$! + echo "Started WhiteLabel Service with PID $WHITELABEL_PID" + cd .. - name: Restore dependencies run: dotnet restore ./src/CSharp/EasyMicroservices.IdentityMicroservice.Client.sln - name: Build @@ -23,3 +42,10 @@ jobs: - name: Test run: | dotnet test ./src/CSharp/EasyMicroservices.IdentityMicroservice.Client.sln --no-build --verbosity normal -f net7.0 + + - name: Cleanup + if: always() + run: echo "Shutting down Authentication Service with PID $AUTH_PID" + kill $AUTH_PID echo "Authentication Service shutdown failed" + echo "Shutting down WhiteLabel Service with PID $WHITELABEL_PID" + kill $WHITELABEL_PID echo "WhiteLabel Service shutdown failed" \ No newline at end of file diff --git a/.github/workflows/dotnet-linux.yml b/.github/workflows/dotnet-linux.yml index 26a57d8..f396974 100644 --- a/.github/workflows/dotnet-linux.yml +++ b/.github/workflows/dotnet-linux.yml @@ -15,7 +15,26 @@ jobs: uses: actions/setup-dotnet@v3 with: dotnet-version: | + 6.0.x 7.0.x + 8.0.x + - name: Clone and run Authentication + run: | + git clone https://github.com/EasyMicroservices/Authentications-Microservice.git + cd Authentications-Microservice + dotnet run --project src/CSharp/EasyMicroservices.AuthenticationsMicroservice.WebApi/EasyMicroservices.AuthenticationsMicroservice.WebApi.csproj & + AUTH_PID=$! + echo "Started Authentication Service with PID $AUTH_PID" + cd .. + shell: bash + - name: Clone and run WhiteLabel + run: | + git clone https://github.com/EasyMicroservices/WhiteLabels-Microservice.git + cd WhiteLabels-Microservice + dotnet run --project src/CSharp/EasyMicroservices.WhiteLabelsMicroservice.WebApi/EasyMicroservices.WhiteLabelsMicroservice.WebApi.csproj & + WHITELABEL_PID=$! + echo "Started WhiteLabel Service with PID $WHITELABEL_PID" + cd .. - name: Restore dependencies run: dotnet restore ./src/CSharp/EasyMicroservices.IdentityMicroservice.sln - name: Build @@ -23,3 +42,10 @@ jobs: - name: Test run: | dotnet test ./src/CSharp/EasyMicroservices.IdentityMicroservice.sln --no-build --verbosity normal -f net7.0 + + - name: Cleanup + if: always() + run: echo "Shutting down Authentication Service with PID $AUTH_PID" + kill $AUTH_PID echo "Authentication Service shutdown failed" + echo "Shutting down WhiteLabel Service with PID $WHITELABEL_PID" + kill $WHITELABEL_PID echo "WhiteLabel Service shutdown failed" \ No newline at end of file diff --git a/.github/workflows/dotnet-macos-client.yml b/.github/workflows/dotnet-macos-client.yml index f14aef0..11e1d52 100644 --- a/.github/workflows/dotnet-macos-client.yml +++ b/.github/workflows/dotnet-macos-client.yml @@ -15,7 +15,26 @@ jobs: uses: actions/setup-dotnet@v3 with: dotnet-version: | + 6.0.x 7.0.x + 8.0.x + - name: Clone and run Authentication + run: | + git clone https://github.com/EasyMicroservices/Authentications-Microservice.git + cd Authentications-Microservice + dotnet run --project src/CSharp/EasyMicroservices.AuthenticationsMicroservice.WebApi/EasyMicroservices.AuthenticationsMicroservice.WebApi.csproj & + AUTH_PID=$! + echo "Started Authentication Service with PID $AUTH_PID" + cd .. + shell: bash + - name: Clone and run WhiteLabel + run: | + git clone https://github.com/EasyMicroservices/WhiteLabels-Microservice.git + cd WhiteLabels-Microservice + dotnet run --project src/CSharp/EasyMicroservices.WhiteLabelsMicroservice.WebApi/EasyMicroservices.WhiteLabelsMicroservice.WebApi.csproj & + WHITELABEL_PID=$! + echo "Started WhiteLabel Service with PID $WHITELABEL_PID" + cd .. - name: Restore dependencies run: dotnet restore ./src/CSharp/EasyMicroservices.IdentityMicroservice.Client.sln - name: Build @@ -23,3 +42,10 @@ jobs: - name: Test run: | dotnet test ./src/CSharp/EasyMicroservices.IdentityMicroservice.Client.sln --no-build --verbosity normal -f net7.0 + + - name: Cleanup + if: always() + run: echo "Shutting down Authentication Service with PID $AUTH_PID" + kill $AUTH_PID echo "Authentication Service shutdown failed" + echo "Shutting down WhiteLabel Service with PID $WHITELABEL_PID" + kill $WHITELABEL_PID echo "WhiteLabel Service shutdown failed" \ No newline at end of file diff --git a/.github/workflows/dotnet-macos.yml b/.github/workflows/dotnet-macos.yml index 1149e55..8611c7a 100644 --- a/.github/workflows/dotnet-macos.yml +++ b/.github/workflows/dotnet-macos.yml @@ -15,7 +15,26 @@ jobs: uses: actions/setup-dotnet@v3 with: dotnet-version: | + 6.0.x 7.0.x + 8.0.x + - name: Clone and run Authentication + run: | + git clone https://github.com/EasyMicroservices/Authentications-Microservice.git + cd Authentications-Microservice + dotnet run --project src/CSharp/EasyMicroservices.AuthenticationsMicroservice.WebApi/EasyMicroservices.AuthenticationsMicroservice.WebApi.csproj & + AUTH_PID=$! + echo "Started Authentication Service with PID $AUTH_PID" + cd .. + shell: bash + - name: Clone and run WhiteLabel + run: | + git clone https://github.com/EasyMicroservices/WhiteLabels-Microservice.git + cd WhiteLabels-Microservice + dotnet run --project src/CSharp/EasyMicroservices.WhiteLabelsMicroservice.WebApi/EasyMicroservices.WhiteLabelsMicroservice.WebApi.csproj & + WHITELABEL_PID=$! + echo "Started WhiteLabel Service with PID $WHITELABEL_PID" + cd .. - name: Restore dependencies run: dotnet restore ./src/CSharp/EasyMicroservices.IdentityMicroservice.sln - name: Build @@ -23,3 +42,10 @@ jobs: - name: Test run: | dotnet test ./src/CSharp/EasyMicroservices.IdentityMicroservice.sln --no-build --verbosity normal -f net7.0 + + - name: Cleanup + if: always() + run: echo "Shutting down Authentication Service with PID $AUTH_PID" + kill $AUTH_PID echo "Authentication Service shutdown failed" + echo "Shutting down WhiteLabel Service with PID $WHITELABEL_PID" + kill $WHITELABEL_PID echo "WhiteLabel Service shutdown failed" \ No newline at end of file diff --git a/.github/workflows/dotnet-windows-client.yml b/.github/workflows/dotnet-windows-client.yml index e060e83..404f32d 100644 --- a/.github/workflows/dotnet-windows-client.yml +++ b/.github/workflows/dotnet-windows-client.yml @@ -15,10 +15,37 @@ jobs: uses: actions/setup-dotnet@v3 with: dotnet-version: | + 6.0.x 7.0.x + 8.0.x + - name: Clone and run Authentication + run: | + git clone https://github.com/EasyMicroservices/Authentications-Microservice.git + cd Authentications-Microservice + dotnet run --project src/CSharp/EasyMicroservices.AuthenticationsMicroservice.WebApi/EasyMicroservices.AuthenticationsMicroservice.WebApi.csproj & + AUTH_PID=$! + echo "Started Authentication Service with PID $AUTH_PID" + cd .. + shell: bash + - name: Clone and run WhiteLabel + run: | + git clone https://github.com/EasyMicroservices/WhiteLabels-Microservice.git + cd WhiteLabels-Microservice + dotnet run --project src/CSharp/EasyMicroservices.WhiteLabelsMicroservice.WebApi/EasyMicroservices.WhiteLabelsMicroservice.WebApi.csproj & + WHITELABEL_PID=$! + echo "Started WhiteLabel Service with PID $WHITELABEL_PID" + cd .. + shell: bash - name: Restore dependencies run: dotnet restore ./src/CSharp/EasyMicroservices.IdentityMicroservice.Client.sln - name: Build run: dotnet build ./src/CSharp/EasyMicroservices.IdentityMicroservice.Client.sln --no-restore - name: Test run: dotnet test ./src/CSharp/EasyMicroservices.IdentityMicroservice.Client.sln --no-build --verbosity normal + + - name: Cleanup + if: always() + run: echo "Shutting down Authentication Service with PID $AUTH_PID" + kill $AUTH_PID echo "Authentication Service shutdown failed" + echo "Shutting down WhiteLabel Service with PID $WHITELABEL_PID" + kill $WHITELABEL_PID echo "WhiteLabel Service shutdown failed" \ No newline at end of file diff --git a/.github/workflows/dotnet-windows.yml b/.github/workflows/dotnet-windows.yml index 442665c..d24f6e7 100644 --- a/.github/workflows/dotnet-windows.yml +++ b/.github/workflows/dotnet-windows.yml @@ -15,10 +15,37 @@ jobs: uses: actions/setup-dotnet@v3 with: dotnet-version: | + 6.0.x 7.0.x + 8.0.x + - name: Clone and run Authentication + run: | + git clone https://github.com/EasyMicroservices/Authentications-Microservice.git + cd Authentications-Microservice + dotnet run --project src/CSharp/EasyMicroservices.AuthenticationsMicroservice.WebApi/EasyMicroservices.AuthenticationsMicroservice.WebApi.csproj & + AUTH_PID=$! + echo "Started Authentication Service with PID $AUTH_PID" + cd .. + shell: bash + - name: Clone and run WhiteLabel + run: | + git clone https://github.com/EasyMicroservices/WhiteLabels-Microservice.git + cd WhiteLabels-Microservice + dotnet run --project src/CSharp/EasyMicroservices.WhiteLabelsMicroservice.WebApi/EasyMicroservices.WhiteLabelsMicroservice.WebApi.csproj & + WHITELABEL_PID=$! + echo "Started WhiteLabel Service with PID $WHITELABEL_PID" + cd .. + shell: bash - name: Restore dependencies run: dotnet restore ./src/CSharp/EasyMicroservices.IdentityMicroservice.sln - name: Build run: dotnet build ./src/CSharp/EasyMicroservices.IdentityMicroservice.sln --no-restore - name: Test run: dotnet test ./src/CSharp/EasyMicroservices.IdentityMicroservice.sln --no-build --verbosity normal + + - name: Cleanup + if: always() + run: echo "Shutting down Authentication Service with PID $AUTH_PID" + kill $AUTH_PID echo "Authentication Service shutdown failed" + echo "Shutting down WhiteLabel Service with PID $WHITELABEL_PID" + kill $WHITELABEL_PID echo "WhiteLabel Service shutdown failed" \ No newline at end of file diff --git a/.github/workflows/nuget-push-public-client.yml b/.github/workflows/nuget-push-public-client.yml index ee3db06..a6d7ba4 100644 --- a/.github/workflows/nuget-push-public-client.yml +++ b/.github/workflows/nuget-push-public-client.yml @@ -10,9 +10,27 @@ jobs: - uses: actions/setup-dotnet@v3 with: dotnet-version: | + 6.0.x 7.0.x - env: - DOTNET_INSTALL_DIR: /usr/share/dotnet + 8.0.x + - name: Clone and run Authentication + run: | + git clone https://github.com/EasyMicroservices/Authentications-Microservice.git + cd Authentications-Microservice + dotnet run --project src/CSharp/EasyMicroservices.AuthenticationsMicroservice.WebApi/EasyMicroservices.AuthenticationsMicroservice.WebApi.csproj & + AUTH_PID=$! + echo "Started Authentication Service with PID $AUTH_PID" + cd .. + shell: bash + - name: Clone and run WhiteLabel + run: | + git clone https://github.com/EasyMicroservices/WhiteLabels-Microservice.git + cd WhiteLabels-Microservice + dotnet run --project src/CSharp/EasyMicroservices.WhiteLabelsMicroservice.WebApi/EasyMicroservices.WhiteLabelsMicroservice.WebApi.csproj & + WHITELABEL_PID=$! + echo "Started WhiteLabel Service with PID $WHITELABEL_PID" + cd .. + shell: bash - name: Restore dependencies run: dotnet restore ./src/CSharp/EasyMicroservices.IdentityMicroservice.Client.sln - name: Build @@ -22,4 +40,11 @@ jobs: - name: Create the package run: dotnet pack ./src/CSharp/EasyMicroservices.IdentityMicroservice.Client.sln --output nupkgs - name: Publish the package to NuGet.org - run: dotnet nuget push nupkgs\*.nupkg -k ${{secrets.NUGET_KEY}} -s https://api.nuget.org/v3/index.json --skip-duplicate \ No newline at end of file + run: dotnet nuget push nupkgs\*.nupkg -k ${{secrets.NUGET_KEY}} -s https://api.nuget.org/v3/index.json --skip-duplicate + + - name: Cleanup + if: always() + run: echo "Shutting down Authentication Service with PID $AUTH_PID" + kill $AUTH_PID echo "Authentication Service shutdown failed" + echo "Shutting down WhiteLabel Service with PID $WHITELABEL_PID" + kill $WHITELABEL_PID echo "WhiteLabel Service shutdown failed" \ No newline at end of file diff --git a/.github/workflows/nuget-push-public.yml b/.github/workflows/nuget-push-public.yml index fadf754..0e94039 100644 --- a/.github/workflows/nuget-push-public.yml +++ b/.github/workflows/nuget-push-public.yml @@ -10,9 +10,27 @@ jobs: - uses: actions/setup-dotnet@v3 with: dotnet-version: | + 6.0.x 7.0.x - env: - DOTNET_INSTALL_DIR: /usr/share/dotnet + 8.0.x + - name: Clone and run Authentication + run: | + git clone https://github.com/EasyMicroservices/Authentications-Microservice.git + cd Authentications-Microservice + dotnet run --project src/CSharp/EasyMicroservices.AuthenticationsMicroservice.WebApi/EasyMicroservices.AuthenticationsMicroservice.WebApi.csproj & + AUTH_PID=$! + echo "Started Authentication Service with PID $AUTH_PID" + cd .. + shell: bash + - name: Clone and run WhiteLabel + run: | + git clone https://github.com/EasyMicroservices/WhiteLabels-Microservice.git + cd WhiteLabels-Microservice + dotnet run --project src/CSharp/EasyMicroservices.WhiteLabelsMicroservice.WebApi/EasyMicroservices.WhiteLabelsMicroservice.WebApi.csproj & + WHITELABEL_PID=$! + echo "Started WhiteLabel Service with PID $WHITELABEL_PID" + cd .. + shell: bash - name: Restore dependencies run: dotnet restore ./src/CSharp/EasyMicroservices.IdentityMicroservice.sln - name: Build @@ -22,4 +40,11 @@ jobs: - name: Create the package run: dotnet pack ./src/CSharp/EasyMicroservices.IdentityMicroservice.sln --output nupkgs - name: Publish the package to NuGet.org - run: dotnet nuget push nupkgs\*.nupkg -k ${{secrets.NUGET_KEY}} -s https://api.nuget.org/v3/index.json --skip-duplicate \ No newline at end of file + run: dotnet nuget push nupkgs\*.nupkg -k ${{secrets.NUGET_KEY}} -s https://api.nuget.org/v3/index.json --skip-duplicate + + - name: Cleanup + if: always() + run: echo "Shutting down Authentication Service with PID $AUTH_PID" + kill $AUTH_PID echo "Authentication Service shutdown failed" + echo "Shutting down WhiteLabel Service with PID $WHITELABEL_PID" + kill $WHITELABEL_PID echo "WhiteLabel Service shutdown failed" \ No newline at end of file diff --git a/src/CSharp/EasyMicroservices.IdentityMicroservice.Client.sln b/src/CSharp/EasyMicroservices.IdentityMicroservice.Client.sln index 34c0af5..f3c6327 100644 --- a/src/CSharp/EasyMicroservices.IdentityMicroservice.Client.sln +++ b/src/CSharp/EasyMicroservices.IdentityMicroservice.Client.sln @@ -9,7 +9,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Test-Layer", "Test-Layer", EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyMicroservices.IdentityMicroservice.Clients", "EasyMicroservices.IdentityMicroservice.Clients\EasyMicroservices.IdentityMicroservice.Clients.csproj", "{EBDC4665-F64A-4F50-B939-3ACCAFB72A3D}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyMicroservices.IdentityMicroservice.Clients.Tests", "EasyMicroservices.IdentityMicroservice.Tests\EasyMicroservices.IdentityMicroservice.Clients.Tests.csproj", "{3969FAB0-9A48-4516-97DD-C1882DDF1E96}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyMicroservices.IdentityMicroservice.Clients.Tests", "EasyMicroservices.IdentityMicroservice.Clients.Tests\EasyMicroservices.IdentityMicroservice.Clients.Tests.csproj", "{FC8072F3-3FE4-405C-B3C6-EF5927599515}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -33,25 +33,25 @@ Global {EBDC4665-F64A-4F50-B939-3ACCAFB72A3D}.Release|x64.Build.0 = Release|x64 {EBDC4665-F64A-4F50-B939-3ACCAFB72A3D}.Release|x86.ActiveCfg = Release|x86 {EBDC4665-F64A-4F50-B939-3ACCAFB72A3D}.Release|x86.Build.0 = Release|x86 - {3969FAB0-9A48-4516-97DD-C1882DDF1E96}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3969FAB0-9A48-4516-97DD-C1882DDF1E96}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3969FAB0-9A48-4516-97DD-C1882DDF1E96}.Debug|x64.ActiveCfg = Debug|Any CPU - {3969FAB0-9A48-4516-97DD-C1882DDF1E96}.Debug|x64.Build.0 = Debug|Any CPU - {3969FAB0-9A48-4516-97DD-C1882DDF1E96}.Debug|x86.ActiveCfg = Debug|Any CPU - {3969FAB0-9A48-4516-97DD-C1882DDF1E96}.Debug|x86.Build.0 = Debug|Any CPU - {3969FAB0-9A48-4516-97DD-C1882DDF1E96}.Release|Any CPU.ActiveCfg = Release|Any CPU - {3969FAB0-9A48-4516-97DD-C1882DDF1E96}.Release|Any CPU.Build.0 = Release|Any CPU - {3969FAB0-9A48-4516-97DD-C1882DDF1E96}.Release|x64.ActiveCfg = Release|Any CPU - {3969FAB0-9A48-4516-97DD-C1882DDF1E96}.Release|x64.Build.0 = Release|Any CPU - {3969FAB0-9A48-4516-97DD-C1882DDF1E96}.Release|x86.ActiveCfg = Release|Any CPU - {3969FAB0-9A48-4516-97DD-C1882DDF1E96}.Release|x86.Build.0 = Release|Any CPU + {FC8072F3-3FE4-405C-B3C6-EF5927599515}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FC8072F3-3FE4-405C-B3C6-EF5927599515}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FC8072F3-3FE4-405C-B3C6-EF5927599515}.Debug|x64.ActiveCfg = Debug|Any CPU + {FC8072F3-3FE4-405C-B3C6-EF5927599515}.Debug|x64.Build.0 = Debug|Any CPU + {FC8072F3-3FE4-405C-B3C6-EF5927599515}.Debug|x86.ActiveCfg = Debug|Any CPU + {FC8072F3-3FE4-405C-B3C6-EF5927599515}.Debug|x86.Build.0 = Debug|Any CPU + {FC8072F3-3FE4-405C-B3C6-EF5927599515}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FC8072F3-3FE4-405C-B3C6-EF5927599515}.Release|Any CPU.Build.0 = Release|Any CPU + {FC8072F3-3FE4-405C-B3C6-EF5927599515}.Release|x64.ActiveCfg = Release|Any CPU + {FC8072F3-3FE4-405C-B3C6-EF5927599515}.Release|x64.Build.0 = Release|Any CPU + {FC8072F3-3FE4-405C-B3C6-EF5927599515}.Release|x86.ActiveCfg = Release|Any CPU + {FC8072F3-3FE4-405C-B3C6-EF5927599515}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution {EBDC4665-F64A-4F50-B939-3ACCAFB72A3D} = {D2CA37CF-478B-4F54-B119-69AE1B8C525B} - {3969FAB0-9A48-4516-97DD-C1882DDF1E96} = {E9B271A6-185D-4C47-A7BA-61832F628E25} + {FC8072F3-3FE4-405C-B3C6-EF5927599515} = {E9B271A6-185D-4C47-A7BA-61832F628E25} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {B8B82934-7EE0-4C86-9065-ADF9092553E1} diff --git a/src/CSharp/EasyMicroservices.IdentityMicroservice.Tests/EasyMicroservices.IdentityMicroservice.Clients.Tests.csproj b/src/CSharp/EasyMicroservices.IdentityMicroservice.Clients.Tests/EasyMicroservices.IdentityMicroservice.Clients.Tests.csproj similarity index 100% rename from src/CSharp/EasyMicroservices.IdentityMicroservice.Tests/EasyMicroservices.IdentityMicroservice.Clients.Tests.csproj rename to src/CSharp/EasyMicroservices.IdentityMicroservice.Clients.Tests/EasyMicroservices.IdentityMicroservice.Clients.Tests.csproj diff --git a/src/CSharp/EasyMicroservices.IdentityMicroservice.Clients.Tests/Usings.cs b/src/CSharp/EasyMicroservices.IdentityMicroservice.Clients.Tests/Usings.cs new file mode 100644 index 0000000..c802f44 --- /dev/null +++ b/src/CSharp/EasyMicroservices.IdentityMicroservice.Clients.Tests/Usings.cs @@ -0,0 +1 @@ +global using Xunit; diff --git a/src/CSharp/EasyMicroservices.IdentityMicroservice.Database/EasyMicroservices.IdentityMicroservice.Database.csproj b/src/CSharp/EasyMicroservices.IdentityMicroservice.Database/EasyMicroservices.IdentityMicroservice.Database.csproj index 27139f8..1dc770a 100644 --- a/src/CSharp/EasyMicroservices.IdentityMicroservice.Database/EasyMicroservices.IdentityMicroservice.Database.csproj +++ b/src/CSharp/EasyMicroservices.IdentityMicroservice.Database/EasyMicroservices.IdentityMicroservice.Database.csproj @@ -1,7 +1,7 @@  - net7.0 + net6.0;net7.0;net8.0 EasyMicroservices.IdentityMicroservice diff --git a/src/CSharp/EasyMicroservices.IdentityMicroservice.Domain/EasyMicroservices.IdentityMicroservice.Domain.csproj b/src/CSharp/EasyMicroservices.IdentityMicroservice.Domain/EasyMicroservices.IdentityMicroservice.Domain.csproj index bb43585..870beed 100644 --- a/src/CSharp/EasyMicroservices.IdentityMicroservice.Domain/EasyMicroservices.IdentityMicroservice.Domain.csproj +++ b/src/CSharp/EasyMicroservices.IdentityMicroservice.Domain/EasyMicroservices.IdentityMicroservice.Domain.csproj @@ -1,7 +1,7 @@  - net7.0 + net6.0;net7.0;net8.0 EasyMicroservices.IdentityMicroservice @@ -11,7 +11,7 @@ - + diff --git a/src/CSharp/EasyMicroservices.IdentityMicroservice.Logics/EasyMicroservices.IdentityMicroservice.Logics.csproj b/src/CSharp/EasyMicroservices.IdentityMicroservice.Logics/EasyMicroservices.IdentityMicroservice.Logics.csproj index 82e3420..56a898c 100644 --- a/src/CSharp/EasyMicroservices.IdentityMicroservice.Logics/EasyMicroservices.IdentityMicroservice.Logics.csproj +++ b/src/CSharp/EasyMicroservices.IdentityMicroservice.Logics/EasyMicroservices.IdentityMicroservice.Logics.csproj @@ -1,7 +1,7 @@  - net7.0 + net6.0;net7.0;net8.0 EasyMicroservices.IdentityMicroservice @@ -9,7 +9,7 @@ - + diff --git a/src/CSharp/EasyMicroservices.IdentityMicroservice.Logics/Helpers/AppUnitOfWork.cs b/src/CSharp/EasyMicroservices.IdentityMicroservice.Logics/Helpers/AppUnitOfWork.cs index 1bcfa38..1a132bb 100644 --- a/src/CSharp/EasyMicroservices.IdentityMicroservice.Logics/Helpers/AppUnitOfWork.cs +++ b/src/CSharp/EasyMicroservices.IdentityMicroservice.Logics/Helpers/AppUnitOfWork.cs @@ -3,6 +3,7 @@ using Contents.GeneratedServices; using EasyMicroservices.Cores.AspEntityFrameworkCoreApi; using EasyMicroservices.Cores.Clients; +using EasyMicroservices.Cores.Models; using EasyMicroservices.IdentityMicroservice.Interfaces; using EasyMicroservices.Logger.Interfaces; using Microsoft.AspNetCore.Http; diff --git a/src/CSharp/EasyMicroservices.IdentityMicroservice.Logics/Helpers/IdentityHelper.cs b/src/CSharp/EasyMicroservices.IdentityMicroservice.Logics/Helpers/IdentityHelper.cs index db16faa..a531388 100644 --- a/src/CSharp/EasyMicroservices.IdentityMicroservice.Logics/Helpers/IdentityHelper.cs +++ b/src/CSharp/EasyMicroservices.IdentityMicroservice.Logics/Helpers/IdentityHelper.cs @@ -50,7 +50,7 @@ public async Task> Register(Contracts. }; } - public virtual async Task Login(Contracts.Common.UserSummaryContract request) + public virtual async Task<(long UserId, string UniqueIdentity)> Login(Contracts.Common.UserSummaryContract request) { var _whiteLabelClient = _appUnitOfWork.GetWhiteLabelClient(); var uniqueIdentity = await _whiteLabelClient.GetUniqueIdentityByKeyAsync(new WhiteLables.GeneratedServices.GuidGetByIdRequestContract @@ -66,10 +66,7 @@ public virtual async Task Login(Contracts.Common.UserSumm }).AsCheckedResult(x => x.Result); - return new LoginResponseContract - { - UserId = user.Id - }; + return (user.Id, uniqueIdentity); } public Task GetFullAccessPersonalAccessToken() diff --git a/src/CSharp/EasyMicroservices.IdentityMicroservice.Services/EasyMicroservices.IdentityMicroservice.Services.csproj b/src/CSharp/EasyMicroservices.IdentityMicroservice.Services/EasyMicroservices.IdentityMicroservice.Services.csproj index 3483c41..77944d2 100644 --- a/src/CSharp/EasyMicroservices.IdentityMicroservice.Services/EasyMicroservices.IdentityMicroservice.Services.csproj +++ b/src/CSharp/EasyMicroservices.IdentityMicroservice.Services/EasyMicroservices.IdentityMicroservice.Services.csproj @@ -1,7 +1,7 @@  - net7.0 + net6.0;net7.0;net8.0 EasyMicroservices.IdentityMicroservice diff --git a/src/CSharp/EasyMicroservices.IdentityMicroservice.StartUp/EasyMicroservices.IdentityMicroservice.StartUp.csproj b/src/CSharp/EasyMicroservices.IdentityMicroservice.StartUp/EasyMicroservices.IdentityMicroservice.StartUp.csproj index 5e97ac1..d4a69b7 100644 --- a/src/CSharp/EasyMicroservices.IdentityMicroservice.StartUp/EasyMicroservices.IdentityMicroservice.StartUp.csproj +++ b/src/CSharp/EasyMicroservices.IdentityMicroservice.StartUp/EasyMicroservices.IdentityMicroservice.StartUp.csproj @@ -1,7 +1,7 @@  - net7.0 + net6.0;net7.0;net8.0 EasyMicroservices.IdentityMicroservice diff --git a/src/CSharp/EasyMicroservices.IdentityMicroservice.Tests/EasyMicroservices.IdentityMicroservice.Tests.csproj b/src/CSharp/EasyMicroservices.IdentityMicroservice.Tests/EasyMicroservices.IdentityMicroservice.Tests.csproj index 23d5e27..0d4f787 100644 --- a/src/CSharp/EasyMicroservices.IdentityMicroservice.Tests/EasyMicroservices.IdentityMicroservice.Tests.csproj +++ b/src/CSharp/EasyMicroservices.IdentityMicroservice.Tests/EasyMicroservices.IdentityMicroservice.Tests.csproj @@ -1,16 +1,24 @@ - + - net7.0 + net6.0;net7.0;net8.0 enable - enable - - false + true true + + AnyCPU;x64;x86 + EasyMicroservices + 0.0.0.1 + Identity Microservice Tests + EasyMicroservices@gmail.com + test,identity,login,register,services,asp,aspnet,auth,authentication,authentications + https://github.com/EasyMicroservices/Identity-Microservice + latest - + + @@ -23,4 +31,8 @@ + + + + diff --git a/src/CSharp/EasyMicroservices.IdentityMicroservice.Tests/Fixtures/AuthenticationTestFixture.cs b/src/CSharp/EasyMicroservices.IdentityMicroservice.Tests/Fixtures/AuthenticationTestFixture.cs new file mode 100644 index 0000000..aea5420 --- /dev/null +++ b/src/CSharp/EasyMicroservices.IdentityMicroservice.Tests/Fixtures/AuthenticationTestFixture.cs @@ -0,0 +1,37 @@ +using EasyMicroservices.Cores.AspEntityFrameworkCoreApi; +using EasyMicroservices.IdentityMicroservice.BackgroundServices; +using EasyMicroservices.IdentityMicroservice.Database.Contexts; +using EasyMicroservices.IdentityMicroservice.Interfaces; +using EasyMicroservices.IdentityMicroservice.WebApi; +using EasyMicroservices.IdentityMicroservice.WebApi.Controllers; +using Identity.GeneratedServices; +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.DependencyInjection; + +namespace EasyMicroservices.IdentityMicroservice.Tests.Fixtures; +public class AuthenticationTestFixture : IAsyncLifetime +{ + public IServiceProvider ServiceProvider { get; private set; } + public Task DisposeAsync() + { + return Task.CompletedTask; + } + + public async Task InitializeAsync() + { + var app = Program.CreateBuilder(null); + string baseUrl = $"http://localhost:{2007}"; + app.Services.AddSingleton(s => new HttpClient()); + app.Services.AddTransient(s => new AuthenticationClient(baseUrl, s.GetService())); + app.Services.AddMvc().AddApplicationPart(typeof(AuthenticationController).Assembly); + + var build = await app.Build(true); + build.MapControllers(); + using var scope = build.Services.CreateScope(); + var unitOfWork = scope.ServiceProvider.GetService(); + await InternalTokenGeneratorBackgroundService.GetToken(unitOfWork); + ServiceProvider = app.Services.BuildServiceProvider(); + _ = build.RunAsync(); + } +} diff --git a/src/CSharp/EasyMicroservices.IdentityMicroservice.Tests/LoginTests.cs b/src/CSharp/EasyMicroservices.IdentityMicroservice.Tests/LoginTests.cs new file mode 100644 index 0000000..7b9fba1 --- /dev/null +++ b/src/CSharp/EasyMicroservices.IdentityMicroservice.Tests/LoginTests.cs @@ -0,0 +1,40 @@ +using EasyMicroservices.IdentityMicroservice.Tests.Fixtures; +using EasyMicroservices.ServiceContracts; +using Identity.GeneratedServices; +using Microsoft.Extensions.DependencyInjection; + +namespace EasyMicroservices.IdentityMicroservice.Tests; +public class LoginTests : IClassFixture +{ + AuthenticationClient _authenticationClient; + public LoginTests(AuthenticationTestFixture authenticationTestFixture) + { + _authenticationClient = authenticationTestFixture.ServiceProvider.GetService(); + } + + [Fact] + public async Task LoginOwnerAsync() + { + await GetLoginOwnerAsync(); + } + + public async Task GetLoginOwnerAsync() + { + var loginResult = await _authenticationClient.LoginByPersonalAccessTokenAsync(new LoginByPersonalAccessTokenRequestContract() + { + PersonalAccessToken = "ownerpat" + }).AsCheckedResult(x => x.Result); + Assert.NotNull(loginResult); + Assert.NotEmpty(loginResult.Token); + return loginResult.Token; + } + + public async Task GetLoginAsync(UserSummaryContract userSummaryContract) + { + var loginResult = await _authenticationClient.LoginAsync(userSummaryContract) + .AsCheckedResult(x => x.Result); + Assert.NotNull(loginResult); + Assert.NotEmpty(loginResult.Token); + return loginResult.Token; + } +} diff --git a/src/CSharp/EasyMicroservices.IdentityMicroservice.Tests/MicroserviceClientTest.cs b/src/CSharp/EasyMicroservices.IdentityMicroservice.Tests/MicroserviceClientTest.cs deleted file mode 100644 index c96dc62..0000000 --- a/src/CSharp/EasyMicroservices.IdentityMicroservice.Tests/MicroserviceClientTest.cs +++ /dev/null @@ -1,53 +0,0 @@ -using EasyMicroservices.Laboratory.Engine; -using EasyMicroservices.Laboratory.Engine.Net.Http; - -namespace EasyMicroservices.IdentityMicroservice.Clients.Tests -{ - public class MicroserviceClientTest - { - const int Port = 1201; - string _routeAddress = ""; - public static HttpClient HttpClient { get; set; } = new HttpClient(); - public MicroserviceClientTest() - { - _routeAddress = $"http://localhost:{Port}"; - } - static bool _isInitialized = false; - static SemaphoreSlim Semaphore = new SemaphoreSlim(1); - async Task OnInitialize() - { - if (_isInitialized) - return; - try - { - await Semaphore.WaitAsync(); - _isInitialized = true; - - ResourceManager resourceManager = new ResourceManager(); - HttpHandler httpHandler = new HttpHandler(resourceManager); - await httpHandler.Start(Port); - resourceManager.Append(@$"GET *RequestSkipBody* HTTP/1.1 -Host: localhost:{Port} -Accept: text/plain*RequestSkipBody*" -, -@"HTTP/1.1 200 OK -Content-Type: application/json; charset=utf-8 -Content-Length: 0 - -{""result"":[],""isSuccess"":true,""error"":null}"); - } - finally - { - Semaphore.Release(); - } - } - [Fact] - public async Task GetAllTestTest() - { - //await OnInitialize(); - //var microserviceClient = new Identity.GeneratedServices.MicroserviceClient(_routeAddress, HttpClient); - //var microservices = await microserviceClient.GetAllAsync(); - //Assert.True(microservices.IsSuccess); - } - } -} \ No newline at end of file diff --git a/src/CSharp/EasyMicroservices.IdentityMicroservice.Tests/appsettings.json b/src/CSharp/EasyMicroservices.IdentityMicroservice.Tests/appsettings.json new file mode 100644 index 0000000..5a5f7bd --- /dev/null +++ b/src/CSharp/EasyMicroservices.IdentityMicroservice.Tests/appsettings.json @@ -0,0 +1,52 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "AllowedHosts": "*", + "Databases": [ + { + "Name": "Entity", + "ProviderName": "InMemory", + "ConnectionString": "Server=.;Database=Identity;Integrated Security=True;Trusted_Connection=True;TrustServerCertificate=True" + } + ], + "ServiceAddresses": [ + { + "Name": "Authentication", + "Address": "http://localhost:1044", + "Databases": null + }, + { + "Name": "WhiteLabel", + "Address": "http://localhost:1041", + "Databases": null + }, + { + "Name": "Content", + "Address": "http://localhost:2003", + "Databases": null + } + ], + "Authorization": { + "IsUse": true, + "JWT": { + "Key": "VGhpc0lzGHGHGHlY3JldEtleUZvckp3dEF1dGhlbnRpY2F0aW9u=", + "Issuer": "https://github.com/easymicroservices", + "Audience": "easymicroservices", + + "TokenExpireTimeInSeconds": 86400 + }, + "FullAccessPAT": "ownerpat" + }, + "Swagger": { + "IsUse": true, + "SwaggerUI": { + "Endpoints": [] + } + }, + "HasSSL": false, + "Urls": "http://*:2007" +} diff --git a/src/CSharp/EasyMicroservices.IdentityMicroservice.WebApi/Controllers/AuthenticationController.cs b/src/CSharp/EasyMicroservices.IdentityMicroservice.WebApi/Controllers/AuthenticationController.cs index bdfab4a..a9e341d 100644 --- a/src/CSharp/EasyMicroservices.IdentityMicroservice.WebApi/Controllers/AuthenticationController.cs +++ b/src/CSharp/EasyMicroservices.IdentityMicroservice.WebApi/Controllers/AuthenticationController.cs @@ -88,9 +88,10 @@ public async Task> Login(Contrac var response = await _identityHelper.Login(request); var user = await _appUnitOfWork.GetUserClient() - .GetByIdAsync(new Authentications.GeneratedServices.Int64GetByIdRequestContract + .GetByAsync(new Authentications.GeneratedServices.Int64GetByRequestContract { - Id = response.UserId + Id = response.UserId, + UniqueIdentity = response.UniqueIdentity }) .AsCheckedResult(x => x.Result); @@ -98,7 +99,7 @@ public async Task> Login(Contrac .GetRolesByUserIdAsync(new Authentications.GeneratedServices.GetByIdAndUniqueIdentityRequestContract { Id = response.UserId, - //UniqueIdentity = uniqueIdentity + UniqueIdentity = response.UniqueIdentity }).AsCheckedResult(x => x.Result); List claims = new(); diff --git a/src/CSharp/EasyMicroservices.IdentityMicroservice.WebApi/EasyMicroservices.IdentityMicroservice.WebApi.csproj b/src/CSharp/EasyMicroservices.IdentityMicroservice.WebApi/EasyMicroservices.IdentityMicroservice.WebApi.csproj index 98f504a..742ea02 100644 --- a/src/CSharp/EasyMicroservices.IdentityMicroservice.WebApi/EasyMicroservices.IdentityMicroservice.WebApi.csproj +++ b/src/CSharp/EasyMicroservices.IdentityMicroservice.WebApi/EasyMicroservices.IdentityMicroservice.WebApi.csproj @@ -1,7 +1,7 @@  - net7.0 + net6.0;net7.0;net8.0 enable @@ -19,5 +19,12 @@ + + + + + + + diff --git a/src/CSharp/EasyMicroservices.IdentityMicroservice.WebApi/Program.cs b/src/CSharp/EasyMicroservices.IdentityMicroservice.WebApi/Program.cs index 3f458cd..db1d6c9 100644 --- a/src/CSharp/EasyMicroservices.IdentityMicroservice.WebApi/Program.cs +++ b/src/CSharp/EasyMicroservices.IdentityMicroservice.WebApi/Program.cs @@ -5,6 +5,7 @@ using EasyMicroservices.IdentityMicroservice.Helpers; using EasyMicroservices.IdentityMicroservice.Interfaces; using EasyMicroservices.IdentityMicroservice.Services; +using Microsoft.AspNetCore.Cors.Infrastructure; using Serilog; namespace EasyMicroservices.IdentityMicroservice.WebApi @@ -14,7 +15,18 @@ public class Program public static async Task Main(string[] args) { var app = CreateBuilder(args); - var build = await app.BuildWithUseCors(default, true); + var build = await app.BuildWithUseCors((options) => + { + AddCors(options, + "adahmsay.ir", + "appgenadmin.adahmsay.ir", + "contractgenerator.ir", + "appgenadmin.contractgenerator.ir", + "avalong.signalgo.ir", + "signalgo.ir", + "localhost"); + }, true); + build.MapControllers(); //host server need to get token from start using var scope = build.Services.CreateScope(); @@ -24,7 +36,7 @@ public static async Task Main(string[] args) await build.RunAsync(); } - static WebApplicationBuilder CreateBuilder(string[] args) + public static WebApplicationBuilder CreateBuilder(string[] args) { var app = StartUpExtensions.Create(args); app.Services.AddLogger((options) => @@ -46,6 +58,14 @@ static WebApplicationBuilder CreateBuilder(string[] args) return app; } + static void AddCors(CorsPolicyBuilder options, params string[] sites) + { + options.SetIsOriginAllowed((string origin) => + sites.Any(x => new Uri(origin).Host.Equals(x, StringComparison.OrdinalIgnoreCase))) + .AllowAnyHeader() + .AllowAnyMethod() + .AllowAnyHeader(); + } public static async Task Run(string[] args, Action use) { diff --git a/src/CSharp/EasyMicroservices.IdentityMicroservice.WebApi/appsettings.Development.json b/src/CSharp/EasyMicroservices.IdentityMicroservice.WebApi/appsettings.Development.json index 4b83671..5a5f7bd 100644 --- a/src/CSharp/EasyMicroservices.IdentityMicroservice.WebApi/appsettings.Development.json +++ b/src/CSharp/EasyMicroservices.IdentityMicroservice.WebApi/appsettings.Development.json @@ -31,7 +31,7 @@ } ], "Authorization": { - "Use": true, + "IsUse": true, "JWT": { "Key": "VGhpc0lzGHGHGHlY3JldEtleUZvckp3dEF1dGhlbnRpY2F0aW9u=", "Issuer": "https://github.com/easymicroservices", @@ -41,7 +41,12 @@ }, "FullAccessPAT": "ownerpat" }, - + "Swagger": { + "IsUse": true, + "SwaggerUI": { + "Endpoints": [] + } + }, "HasSSL": false, "Urls": "http://*:2007" } diff --git a/src/CSharp/EasyMicroservices.IdentityMicroservice.WebApi/appsettings.json b/src/CSharp/EasyMicroservices.IdentityMicroservice.WebApi/appsettings.json index 4b83671..5a5f7bd 100644 --- a/src/CSharp/EasyMicroservices.IdentityMicroservice.WebApi/appsettings.json +++ b/src/CSharp/EasyMicroservices.IdentityMicroservice.WebApi/appsettings.json @@ -31,7 +31,7 @@ } ], "Authorization": { - "Use": true, + "IsUse": true, "JWT": { "Key": "VGhpc0lzGHGHGHlY3JldEtleUZvckp3dEF1dGhlbnRpY2F0aW9u=", "Issuer": "https://github.com/easymicroservices", @@ -41,7 +41,12 @@ }, "FullAccessPAT": "ownerpat" }, - + "Swagger": { + "IsUse": true, + "SwaggerUI": { + "Endpoints": [] + } + }, "HasSSL": false, "Urls": "http://*:2007" } diff --git a/src/CSharp/EasyMicroservices.IdentityMicroservice.WebApi/serilog.txt b/src/CSharp/EasyMicroservices.IdentityMicroservice.WebApi/serilog.txt index 2aea86c..3cf7413 100644 --- a/src/CSharp/EasyMicroservices.IdentityMicroservice.WebApi/serilog.txt +++ b/src/CSharp/EasyMicroservices.IdentityMicroservice.WebApi/serilog.txt @@ -121,3 +121,22 @@ EasyMicroservices.ServiceContracts.Exceptions.InvalidResultOfMessageContractExce 2023-12-27 12:58:51.577 +03:30 [DBG] Login success eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJJZCI6IjEiLCJVbmlxdWVJZGVudGl0eSI6IjEtMiIsInJvbGUiOiJPd25lciIsIm5iZiI6MTcwMzY2OTMzMSwiZXhwIjoxNzAzNzU1NzMxLCJpYXQiOjE3MDM2NjkzMzEsImlzcyI6Imh0dHBzOi8vZ2l0aHViLmNvbS9lYXN5bWljcm9zZXJ2aWNlcyIsImF1ZCI6ImVhc3ltaWNyb3NlcnZpY2VzIn0.CpgUWOam3lLfK37JMs_mFxecdKioivXA4L19Pf9PCik 2023-12-29 12:52:17.107 +03:30 [DBG] Try login... 2023-12-29 12:52:18.377 +03:30 [DBG] Login success eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJJZCI6IjEiLCJVbmlxdWVJZGVudGl0eSI6IjEtMiIsInJvbGUiOiJPd25lciIsIm5iZiI6MTcwMzg0MTczOCwiZXhwIjoxNzAzOTI4MTM4LCJpYXQiOjE3MDM4NDE3MzgsImlzcyI6Imh0dHBzOi8vZ2l0aHViLmNvbS9lYXN5bWljcm9zZXJ2aWNlcyIsImF1ZCI6ImVhc3ltaWNyb3NlcnZpY2VzIn0.wNe0EYwpxeXn1iLyWISLa6B8o_FD-rYjR-DBF4glQqw +2023-12-31 00:03:16.334 +03:30 [DBG] Try login... +2023-12-31 00:03:22.319 +03:30 [ERR] Empty +EasyMicroservices.ServiceContracts.Exceptions.InvalidResultOfMessageContractException: The MessageContract is not success, Summary: No connection could be made because the target machine actively refused it. (localhost:1041) + at EasyMicroservices.ServiceContracts.MessageContract.ThrowsIfFails() + at EasyMicroservices.ServiceContracts.MessageContractExtensions.ThrowsIfFails(Object result) + at EasyMicroservices.ServiceContracts.MessageContractExtensions.AsCheckedResult[T,T2](Task`1 task, Func`2 mapResult) + at EasyMicroservices.IdentityMicroservice.Helpers.IdentityHelper.GetFullAccessPersonalAccessToken(String personalAccessToken) in D:\Github\EasyMicroservices\Microservices\Identity\src\CSharp\EasyMicroservices.IdentityMicroservice.Logics\Helpers\IdentityHelper.cs:line 83 + at EasyMicroservices.IdentityMicroservice.BackgroundServices.InternalTokenGeneratorBackgroundService.GetToken(IAppUnitOfWork appUnitOfWork) in D:\Github\EasyMicroservices\Microservices\Identity\src\CSharp\EasyMicroservices.IdentityMicroservice.Logics\BackgroundServices\InternalTokenGeneratorBackgroundService.cs:line 37 +2023-12-31 00:05:27.386 +03:30 [DBG] Try login... +2023-12-31 00:05:46.976 +03:30 [ERR] Empty +EasyMicroservices.ServiceContracts.Exceptions.InvalidResultOfMessageContractException: The MessageContract is not success, Summary: uniqueIdentity cannot be null or empty! + at EasyMicroservices.ServiceContracts.MessageContract.ThrowsIfFails() + at EasyMicroservices.ServiceContracts.MessageContractExtensions.ThrowsIfFails(Object result) + at EasyMicroservices.ServiceContracts.MessageContractExtensions.AsCheckedResult[T,T2](Task`1 task, Func`2 mapResult) + at EasyMicroservices.IdentityMicroservice.Helpers.IdentityHelper.GetFullAccessPersonalAccessToken(String personalAccessToken) in D:\Github\EasyMicroservices\Microservices\Identity\src\CSharp\EasyMicroservices.IdentityMicroservice.Logics\Helpers\IdentityHelper.cs:line 83 + at EasyMicroservices.IdentityMicroservice.BackgroundServices.InternalTokenGeneratorBackgroundService.GetToken(IAppUnitOfWork appUnitOfWork) in D:\Github\EasyMicroservices\Microservices\Identity\src\CSharp\EasyMicroservices.IdentityMicroservice.Logics\BackgroundServices\InternalTokenGeneratorBackgroundService.cs:line 37 +2023-12-31 00:07:02.667 +03:30 [DBG] Try login... +2024-01-01 23:44:35.443 +03:30 [DBG] Try login... +2024-01-01 23:44:38.834 +03:30 [DBG] Login success eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJJZCI6IjEiLCJVbmlxdWVJZGVudGl0eSI6IjEtMiIsInJvbGUiOiJPd25lciIsIm5iZiI6MTcwNDE0MDA3OCwiZXhwIjoxNzA0MjI2NDc4LCJpYXQiOjE3MDQxNDAwNzgsImlzcyI6Imh0dHBzOi8vZ2l0aHViLmNvbS9lYXN5bWljcm9zZXJ2aWNlcyIsImF1ZCI6ImVhc3ltaWNyb3NlcnZpY2VzIn0.0E0XB4VI9R5irmSoJOJlnG_StcmZUjRKR7o1Dnl8ZHc