Skip to content

Commit

Permalink
Merge pull request #38 from marcelwemhoff/feature/UpdateDependencies
Browse files Browse the repository at this point in the history
update dependencies & remove old ASP.NET Core v2.2 dependencies
  • Loading branch information
ckuetbach authored Oct 25, 2024
2 parents f446632 + ae87336 commit fb4be4f
Show file tree
Hide file tree
Showing 17 changed files with 88 additions and 126 deletions.
20 changes: 9 additions & 11 deletions dvelop-sdk-cloudcenter/CloudCenterDtos/CloudCenterDtos.csproj
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>Dvelop.Sdk.CloudCenter.Dto</RootNamespace>
<AssemblyName>Dvelop.Sdk.CloudCenter.Dto</AssemblyName>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<LangVersion>latestmajor</LangVersion>
</PropertyGroup>

<PublishRepositoryUrl>true</PublishRepositoryUrl>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<LangVersion>latestmajor</LangVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion dvelop-sdk-config/ConfigDtos/ConfigDtos.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.2" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="MSTest.TestAdapter" Version="3.6.0" />
<PackageReference Include="MSTest.TestFramework" Version="3.6.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.6.1" />
<PackageReference Include="MSTest.TestFramework" Version="3.6.1" />
<PackageReference Include="coverlet.collector" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@


<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Authentication" Version="2.2.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
using System;
using System.Collections.Concurrent;

using System.Security.Claims;
using Microsoft.AspNetCore.Authentication;

namespace Dvelop.Sdk.IdentityProvider.Client
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyName>Dvelop.Sdk.IdentityProvider.Dto</AssemblyName>
<RootNamespace>Dvelop.Sdk.IdentityProvider.Dto</RootNamespace>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
</ItemGroup>


<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<AssemblyName>Dvelop.Sdk.IdentityProvider.Dto</AssemblyName>
<RootNamespace>Dvelop.Sdk.IdentityProvider.Dto</RootNamespace>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<LangVersion>latestmajor</LangVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
<PackageReference Include="FluentAssertions" Version="6.12.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="Moq" Version="4.20.72" />
<PackageReference Include="MSTest.TestAdapter" Version="3.6.0" />
<PackageReference Include="MSTest.TestFramework" Version="3.6.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.6.1" />
<PackageReference Include="MSTest.TestFramework" Version="3.6.1" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
Expand All @@ -14,7 +14,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Routing.Abstractions" Version="2.2.0" />
<FrameworkReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.2" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="8.0.1" />
<PackageReference Include="System.Text.Encodings.Web" Version="8.0.0" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Http" Version="2.2.2" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="MSTest.TestAdapter" Version="3.6.0" />
<PackageReference Include="MSTest.TestFramework" Version="3.6.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.6.1" />
<PackageReference Include="MSTest.TestFramework" Version="3.6.1" />
<PackageReference Include="coverlet.collector" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
18 changes: 6 additions & 12 deletions dvelop-sdk-signing/SigningAlgorithms/SigningAlgorithms.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,14 @@
<RootNamespace>Dvelop.Sdk.SigningAlgorithms</RootNamespace>
<LangVersion>latestmajor</LangVersion>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
</ItemGroup>

<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Abstractions" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.1" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.2" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="6.12.1" />
<PackageReference Include="Microsoft.AspNetCore.Http" Version="2.2.2" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="Moq" Version="4.20.72" />
<PackageReference Include="MSTest.TestAdapter" Version="3.6.0" />
<PackageReference Include="MSTest.TestFramework" Version="3.6.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.6.1" />
<PackageReference Include="MSTest.TestFramework" Version="3.6.1" />
</ItemGroup>

<ItemGroup>
Expand Down
7 changes: 2 additions & 5 deletions dvelop-sdk-tenant/TenantMiddleware/TenantMiddleware.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,12 @@
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<LangVersion>latestmajor</LangVersion>
</PropertyGroup>

<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
</ItemGroup>


<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.2.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using Dvelop.Sdk.WebApiExtensions.Extensions;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Http.Features;
using Microsoft.AspNetCore.Http.Internal;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Dvelop.Sdk.WebApiExtensions.UnitTest.Extensions
Expand All @@ -17,76 +16,70 @@ public class Dv1HmacSha256RequestSigningExtensionTest
[TestMethod]
public async Task TestCalculateDv1HmacSha256SignatureFromExample()
{
var x = new DefaultHttpRequest(new DefaultHttpContext())
var x = new DefaultHttpContext
{
Method = "POST",
Path = "/myapp/dvelop-cloud-lifecycle-event",
ContentType = "application/json",
Body = new MemoryStream(Encoding.UTF8.GetBytes("{\"type\":\"subscribe\",\"tenantId\":\"id\",\"baseUri\":\"https://someone.d-velop.cloud\"}\n")),
Headers =
Request =
{
{"x-dv-signature-timestamp","2019-08-09T08:49:42Z"},
{"x-dv-signature-algorithm", "DV1-HMAC-SHA256"},
{"x-dv-signature-headers", "x-dv-signature-algorithm,x-dv-signature-headers,x-dv-signature-timestamp"},
{"Authorization","Bearer 02783453441665bf27aa465cbbac9b98507ae94c54b6be2b1882fe9a05ec104c"}
Method = "POST",
Path = "/myapp/dvelop-cloud-lifecycle-event",
ContentType = "application/json",
Body = new MemoryStream(Encoding.UTF8.GetBytes("{\"type\":\"subscribe\",\"tenantId\":\"id\",\"baseUri\":\"https://someone.d-velop.cloud\"}\n")),
}
};
x.Request.Headers.Authorization = "Bearer 02783453441665bf27aa465cbbac9b98507ae94c54b6be2b1882fe9a05ec104c";
x.Request.Headers["x-dv-signature-headers"] = "x-dv-signature-algorithm,x-dv-signature-headers,x-dv-signature-timestamp";
x.Request.Headers["x-dv-signature-algorithm"] = "DV1-HMAC-SHA256";
x.Request.Headers["x-dv-signature-timestamp"] = "2019-08-09T08:49:42Z";
var features = x.HttpContext.Features.Get<IHttpRequestFeature>();
features.RawTarget = "https://acme-apptemplate.service.d-velop.cloud/myapp/dvelop-cloud-lifecycle-event";
var calculated = await x.CalculateDv1HmacSha256Signature("Rg9iJXX0Jkun9u4Rp6no8HTNEdHlfX9aZYbFJ9b6YdQ=").ConfigureAwait(false);
var calculated = await x.Request.CalculateDv1HmacSha256Signature("Rg9iJXX0Jkun9u4Rp6no8HTNEdHlfX9aZYbFJ9b6YdQ=").ConfigureAwait(false);
Assert.AreEqual( "02783453441665bf27aa465cbbac9b98507ae94c54b6be2b1882fe9a05ec104c", calculated );
}



[TestMethod]
public async Task TestCalculateDv1HmacSha256Signature1()
{
var x = new DefaultHttpRequest(new DefaultHttpContext())
var x = new DefaultHttpContext
{
Method = "POST",
Path = "/prod/acme-apptemplatecs/dvelop-cloud-lifecycle-event",
ContentType = "application/json",
Body = new MemoryStream(Encoding.UTF8.GetBytes("{\"type\":\"resubscribe\",\"tenantId\":\"id\",\"baseUri\":\"https://someone.d-velop.cloud\"}")),
Headers =
Request =
{
{"x-dv-signature-timestamp","2020-04-30T08:16:40Z"},
{"x-dv-signature-algorithm", "DV1-HMAC-SHA256"},
{"x-dv-signature-headers", "x-dv-signature-algorithm,x-dv-signature-headers,x-dv-signature-timestamp"},
{"Authorization","Bearer cc2bfbac52f30ddee41e4475963f8136c60cab678941560538b1281ad2722aac"}
Method = "POST",
Path = "/prod/acme-apptemplatecs/dvelop-cloud-lifecycle-event",
ContentType = "application/json",
Body = new MemoryStream(Encoding.UTF8.GetBytes("{\"type\":\"resubscribe\",\"tenantId\":\"id\",\"baseUri\":\"https://someone.d-velop.cloud\"}")),
}
};
x.Request.Headers.Authorization = "Bearer cc2bfbac52f30ddee41e4475963f8136c60cab678941560538b1281ad2722aac";
x.Request.Headers["x-dv-signature-headers"] = "x-dv-signature-algorithm,x-dv-signature-headers,x-dv-signature-timestamp";
x.Request.Headers["x-dv-signature-algorithm"] = "DV1-HMAC-SHA256";
x.Request.Headers["x-dv-signature-timestamp"] = "2020-04-30T08:16:40Z";
var features = x.HttpContext.Features.Get<IHttpRequestFeature>();
features.RawTarget = "https://acme-apptemplate.service.d-velop.cloud/prod/acme-apptemplatecs/dvelop-cloud-lifecycle-event";
var calculated = await x.CalculateDv1HmacSha256Signature("Rg9iJXX0Jkun9u4Rp6no8HTNEdHlfX9aZYbFJ9b6YdQ=").ConfigureAwait(false);
var calculated = await x.Request.CalculateDv1HmacSha256Signature("Rg9iJXX0Jkun9u4Rp6no8HTNEdHlfX9aZYbFJ9b6YdQ=").ConfigureAwait(false);
Assert.AreEqual( "cc2bfbac52f30ddee41e4475963f8136c60cab678941560538b1281ad2722aac", calculated);
}


[TestMethod]
public async Task TestCalculateDv1HmacSha256Signature2()
{
var x = new DefaultHttpRequest(new DefaultHttpContext())
var x = new DefaultHttpContext
{
Method = "POST",
Path = "/prod/acme-apptemplatecs/dvelop-cloud-lifecycle-event",
ContentType = "application/json",
Body = new MemoryStream(Encoding.UTF8.GetBytes("{\"type\":\"subscribe\",\"tenantId\":\"id\",\"baseUri\":\"https://someone.d-velop.cloud\"}\n")),
Headers =
Request =
{
{"x-dv-SIGNATURE-timestamp","2019-08-09T08:49:42Z"},
{"x-dv-signature-algorithm", "DV1-HMAC-SHA256"},
{"x-dv-signature-headers", "x-dv-signature-algorithm,x-dv-signature-headers,x-dv-signature-timestamp"},
{"Authorization","Bearer 58b07086ef6d987016d35c8ca2b0c1e48ed1aa8ffe31819402ad8f06c7bd4486"}
Method = "POST",
Path = "/prod/acme-apptemplatecs/dvelop-cloud-lifecycle-event",
ContentType = "application/json",
Body = new MemoryStream(Encoding.UTF8.GetBytes("{\"type\":\"subscribe\",\"tenantId\":\"id\",\"baseUri\":\"https://someone.d-velop.cloud\"}\n"))
}
};
x.Request.Headers.Authorization = "Bearer 58b07086ef6d987016d35c8ca2b0c1e48ed1aa8ffe31819402ad8f06c7bd4486";
x.Request.Headers["x-dv-signature-headers"] = "x-dv-signature-algorithm,x-dv-signature-headers,x-dv-signature-timestamp";
x.Request.Headers["x-dv-signature-algorithm"] = "DV1-HMAC-SHA256";
x.Request.Headers["x-dv-SIGNATURE-timestamp"] = "2019-08-09T08:49:42Z";
var features = x.HttpContext.Features.Get<IHttpRequestFeature>();
features.RawTarget = "https://acme-apptemplate.service.d-velop.cloud/prod/acme-apptemplatecs/dvelop-cloud-lifecycle-event";
var calculated = await x.CalculateDv1HmacSha256Signature("Rg9iJXX0Jkun9u4Rp6no8HTNEdHlfX9aZYbFJ9b6YdQ=").ConfigureAwait(false);
var calculated = await x.Request.CalculateDv1HmacSha256Signature("Rg9iJXX0Jkun9u4Rp6no8HTNEdHlfX9aZYbFJ9b6YdQ=").ConfigureAwait(false);
Assert.AreEqual( "58b07086ef6d987016d35c8ca2b0c1e48ed1aa8ffe31819402ad8f06c7bd4486", calculated);
}

}


}
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,17 @@

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>

<IsPackable>false</IsPackable>

<AssemblyName>Dvelop.Sdk.WebApiExtensions.UnitTest</AssemblyName>

<RootNamespace>Dvelop.Sdk.WebApiExtensions.UnitTest</RootNamespace>

<OutputType>Library</OutputType>

<LangVersion>latestmajor</LangVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Http" Version="2.2.2" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="MSTest.TestAdapter" Version="3.6.0" />
<PackageReference Include="MSTest.TestFramework" Version="3.6.0" />
<PackageReference Include="MSTest.TestAdapter" Version="3.6.1" />
<PackageReference Include="MSTest.TestFramework" Version="3.6.1" />
<PackageReference Include="coverlet.collector" Version="6.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
27 changes: 9 additions & 18 deletions dvelop-sdk-webapi/WebApiExtensions/WebApiExtensions.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,17 @@
<AssemblyName>Dvelop.Sdk.WebApiExtensions</AssemblyName>
<RootNamespace>Dvelop.Sdk.WebApiExtensions</RootNamespace>
<LangVersion>latestmajor</LangVersion>

<PublishRepositoryUrl>true</PublishRepositoryUrl>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="8.0.1" />
</ItemGroup>


<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.2.0" />
</ItemGroup>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\dvelop-sdk-base\BaseInterfaces\BaseInterfaces.csproj" />
<ProjectReference Include="..\..\dvelop-sdk-logging\Logging.Abstractions\Logging.Abstractions.csproj" />
<ProjectReference Include="..\..\dvelop-sdk-signing\SigningAlgorithms\SigningAlgorithms.csproj" />
<FrameworkReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
<ProjectReference Include="..\..\dvelop-sdk-base\BaseInterfaces\BaseInterfaces.csproj" />
<ProjectReference Include="..\..\dvelop-sdk-logging\Logging.Abstractions\Logging.Abstractions.csproj" />
<ProjectReference Include="..\..\dvelop-sdk-signing\SigningAlgorithms\SigningAlgorithms.csproj" />
</ItemGroup>

</Project>

0 comments on commit fb4be4f

Please sign in to comment.