Skip to content

Commit

Permalink
addressed breaking changes
Browse files Browse the repository at this point in the history
  • Loading branch information
petrsvihlik committed Feb 24, 2024
1 parent afbeacc commit 6984a83
Show file tree
Hide file tree
Showing 15 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion src/WopiHost.Abstractions/WopiHost.Abstractions.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<Description>WopiHost.Abstractions Class Library</Description>
<Authors>Petr Svihlik</Authors>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<AssemblyName>WopiHost.Abstractions</AssemblyName>
<PackageId>WopiHost.Abstractions</PackageId>
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
Expand Down
2 changes: 1 addition & 1 deletion src/WopiHost.Cobalt/WopiHost.Cobalt.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<Description>WopiHost.Cobalt Class Library</Description>
<Authors>Petr Svihlik</Authors>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<AssemblyName>WopiHost.Cobalt</AssemblyName>
<PackageId>WopiHost.Cobalt</PackageId>
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
Expand Down
4 changes: 2 additions & 2 deletions src/WopiHost.Core/Controllers/FilesController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@ public async Task<IActionResult> ProcessCobalt(string id)
}

var responseAction = CobaltProcessor.ProcessCobalt(file, User, await HttpContext.Request.Body.ReadBytesAsync());
HttpContext.Response.Headers.Add(WopiHeaders.CORRELATION_ID, HttpContext.Request.Headers[WopiHeaders.CORRELATION_ID]);
HttpContext.Response.Headers.Add("request-id", HttpContext.Request.Headers[WopiHeaders.CORRELATION_ID]);
HttpContext.Response.Headers.Append(WopiHeaders.CORRELATION_ID, HttpContext.Request.Headers[WopiHeaders.CORRELATION_ID]);
HttpContext.Response.Headers.Append("request-id", HttpContext.Request.Headers[WopiHeaders.CORRELATION_ID]);
return new Results.FileResult(responseAction, "application/octet-stream");
}

Expand Down
3 changes: 2 additions & 1 deletion src/WopiHost.Core/Controllers/WopiBootstrapperController.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Net.Mime;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Options;
using Microsoft.Extensions.Primitives;
Expand Down Expand Up @@ -90,7 +91,7 @@ public IActionResult GetRootContainer() //TODO: fix the path
var tokenIssuanceUri = "https://contoso.com/api/oauth2/token";
var providerId = "tp_contoso";
var urlSchemes = Uri.EscapeDataString("{\"iOS\" : [\"contoso\",\"contoso - EMM\"], \"Android\" : [\"contoso\",\"contoso - EMM\"], \"UWP\": [\"contoso\",\"contoso - EMM\"]}");
Response.Headers.Add("WWW-Authenticate", $"Bearer authorization_uri=\"{authorizationUri}\",tokenIssuance_uri=\"{tokenIssuanceUri}\",providerId=\"{providerId}\", UrlSchemes=\"{urlSchemes}\"");
Response.Headers.Append("WWW-Authenticate", $"Bearer authorization_uri=\"{authorizationUri}\",tokenIssuance_uri=\"{tokenIssuanceUri}\",providerId=\"{providerId}\", UrlSchemes=\"{urlSchemes}\"");
return new UnauthorizedResult();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@ protected override Task<AuthenticateResult> HandleAuthenticateAsync()
/// <param name="options">The monitor for the options instance.</param>
/// <param name="logger">The Microsoft.Extensions.Logging.ILoggerFactory.</param>
/// <param name="encoder">The System.Text.Encodings.Web.UrlEncoder.</param>
/// <param name="clock">The Microsoft.AspNetCore.Authentication.ISystemClock.</param>
public AccessTokenHandler(IOptionsMonitor<AccessTokenAuthenticationOptions> options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock) : base(options, logger, encoder, clock)
public AccessTokenHandler(IOptionsMonitor<AccessTokenAuthenticationOptions> options, ILoggerFactory logger, UrlEncoder encoder) : base(options, logger, encoder)
{
// Used by for Dependency Injection
}
Expand Down
2 changes: 1 addition & 1 deletion src/WopiHost.Core/WopiHost.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<Description>WopiHost.Core Class Library</Description>
<Authors>Petr Svihlik</Authors>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<AssemblyName>WopiHost.Core</AssemblyName>
<PackageId>WopiHost.Core</PackageId>
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
Expand Down
2 changes: 1 addition & 1 deletion src/WopiHost.Discovery/WopiHost.Discovery.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<Description>WopiHost.Discovery Class Library</Description>
<Authors>Petr Svihlik</Authors>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<AssemblyName>WopiHost.Discovery</AssemblyName>
<PackageId>WopiHost.Discovery</PackageId>
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<Description>WopiHost.FileSystemProvider Class Library</Description>
<Authors>Petr Svihlik</Authors>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<AssemblyName>WopiHost.FileSystemProvider</AssemblyName>
<PackageId>WopiHost.FileSystemProvider</PackageId>
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
Expand Down
2 changes: 1 addition & 1 deletion src/WopiHost.Url/WopiHost.Url.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<Description>WopiHost.Url Class Library</Description>
<Authors>Petr Svihlik</Authors>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<AssemblyName>WopiHost.Url</AssemblyName>
<PackageId>WopiHost.Url</PackageId>
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
Expand Down
2 changes: 1 addition & 1 deletion src/WopiHost.Web/WopiHost.Web.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<IncludeOpenAPIAnalyzers>true</IncludeOpenAPIAnalyzers>
<PreserveCompilationContext>true</PreserveCompilationContext>
<AssemblyName>WopiHost.Web</AssemblyName>
Expand Down
2 changes: 1 addition & 1 deletion src/WopiHost/WopiHost.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<AssemblyName>WopiHost</AssemblyName>
<OutputType>Exe</OutputType>
<PublishReadyToRun>true</PublishReadyToRun>
Expand Down
2 changes: 1 addition & 1 deletion test/WopiHost.Core.Tests/WopiHost.Core.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\WopiHost.Core\WopiHost.Core.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</ItemGroup>

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

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\WopiHost.FileSystemProvider\WopiHost.FileSystemProvider.csproj" />
Expand Down
2 changes: 1 addition & 1 deletion test/WopiHost.Url.Tests/WopiHost.Url.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\WopiHost.Url\WopiHost.Url.csproj" />
Expand Down

0 comments on commit 6984a83

Please sign in to comment.