Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions samples/AuthorizationInterceptor.Sample.sln
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AuthorizationInterceptor.Ex
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AuthorizationInterceptor.Extensions.HybridCache", "..\src\AuthorizationInterceptor.Extensions.HybridCache\AuthorizationInterceptor.Extensions.HybridCache.csproj", "{B6B934AB-B383-0E92-B44A-22EC3C0F3B20}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AuthorizationInterceptor.Extensions.Abstractions", "..\src\AuthorizationInterceptor.Extensions.Abstractions\AuthorizationInterceptor.Extensions.Abstractions.csproj", "{A3683748-30A4-44D3-F25B-B6B81631267B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -45,6 +47,10 @@ Global
{B6B934AB-B383-0E92-B44A-22EC3C0F3B20}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B6B934AB-B383-0E92-B44A-22EC3C0F3B20}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B6B934AB-B383-0E92-B44A-22EC3C0F3B20}.Release|Any CPU.Build.0 = Release|Any CPU
{A3683748-30A4-44D3-F25B-B6B81631267B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A3683748-30A4-44D3-F25B-B6B81631267B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A3683748-30A4-44D3-F25B-B6B81631267B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A3683748-30A4-44D3-F25B-B6B81631267B}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
1 change: 0 additions & 1 deletion samples/SourceApi/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddOpenApiDocument();

// Add the cache options
builder.Services.AddMemoryCache();
builder.Services.AddStackExchangeRedisCache(opt =>
{
Expand Down
4 changes: 1 addition & 3 deletions samples/SourceApi/SourceApi.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Caching.Hybrid" Version="10.0.0" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="10.0.0" />
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="10.0.0" />
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="10.0.3" />
<PackageReference Include="NSwag.AspNetCore" Version="14.6.3" />
</ItemGroup>

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

<ItemGroup Condition="'$(TargetFramework)' == 'net10.0'">
<PackageReference Include="Microsoft.Extensions.Http" Version="10.0.2" />
<PackageReference Include="Microsoft.Extensions.Http" Version="10.0.3" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net9.0'">
<PackageReference Include="Microsoft.Extensions.Http" Version="9.0.9" />
<PackageReference Include="Microsoft.Extensions.Http" Version="9.0.13" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Caching.Hybrid" Version="10.2.0" />
<PackageReference Include="Microsoft.Extensions.Caching.Hybrid" Version="10.3.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\AuthorizationInterceptor.Extensions.Abstractions\AuthorizationInterceptor.Extensions.Abstractions.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ private HttpRequestMessage AddHeaders(HttpRequestMessage request, AuthorizationH
foreach (var header in headers)
{
LogDebug("Adding header '{header}' to request with integration '{name}'", header.Key, _name);
request.Headers.Remove(header.Key);
request.Headers.TryAddWithoutValidation(header.Key, header.Value);
}

Expand Down
6 changes: 3 additions & 3 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<LangVersion>latest</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Version>5.4.0</Version>
<Version>5.4.1</Version>
<TargetFrameworks>net6.0;net7.0;net8.0;net9.0;net10.0</TargetFrameworks>
<Title>Authorization Interceptor</Title>
<Authors>Adolfok3</Authors>
Expand Down Expand Up @@ -42,11 +42,11 @@
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net10.0' And '$(IsCachingAbstractionsTargeted)' == 'true'">
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="10.0.0" />
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="10.0.3" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net9.0' And '$(IsCachingAbstractionsTargeted)' == 'true'">
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="9.0.9" />
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="9.0.13" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net8.0' And '$(IsCachingAbstractionsTargeted)' == 'true'">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public async Task SendAsync_WithHeaders_ShouldSendRequestCorrectly()
}

[Fact]
public async Task SendAsync_WithHeaders_ShouldReturnsAnauthorized()
public async Task SendAsync_WithHeaders_ShouldReturnsUnauthorized()
{
//Arrange
_strategy.GetHeadersAsync("test", _authenticationHandler, Arg.Any<CancellationToken>()).Returns(new AuthorizationHeaders(TimeSpan.FromMinutes(3))
Expand Down
Loading