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
2 changes: 1 addition & 1 deletion BFF/v4/Angular/Angular.Api/Angular.Api.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="10.0.5" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" />
</ItemGroup>

</Project>
3 changes: 1 addition & 2 deletions BFF/v4/Angular/Angular.Bff/Angular.Bff.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Duende.Bff.Yarp" Version="4.1.2" />
<PackageReference Include="Duende.Bff.Yarp" />
<PackageReference Include="Microsoft.AspNetCore.SpaProxy">
<Version>10.0.2</Version>
</PackageReference>
</ItemGroup>

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

<ItemGroup>
<PackageReference Include="IdentityModel" Version="7.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="10.0.5" />
<PackageReference Include="Serilog.AspNetCore" Version="10.0.0" />
<PackageReference Include="Duende.IdentityModel" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" />
<PackageReference Include="Serilog.AspNetCore" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="10.0.5" />
<PackageReference Include="Duende.BFF.Blazor.Client" Version="4.1.2" />
<PackageReference Include="Microsoft.Extensions.Http" Version="10.0.5" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" />
<PackageReference Include="Duende.BFF.Blazor.Client" />
<PackageReference Include="Microsoft.Extensions.Http" />
</ItemGroup>

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

<ItemGroup>
<ProjectReference Include="..\BlazorAutoRendering.Client\BlazorAutoRendering.Client.csproj" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="10.0.5" />
<PackageReference Include="Duende.BFF" Version="4.1.2" />
<PackageReference Include="Duende.BFF.Blazor" Version="4.1.2" />
<PackageReference Include="Duende.BFF.Yarp" Version="4.1.2" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" />
<PackageReference Include="Duende.BFF" />
<PackageReference Include="Duende.BFF.Blazor" />
<PackageReference Include="Duende.BFF.Yarp" />
</ItemGroup>

</Project>
6 changes: 3 additions & 3 deletions BFF/v4/BlazorWasm/BFF/BFF.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Duende.BFF.Yarp" Version="4.1.2" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="10.0.5" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="10.0.5" />
<PackageReference Include="Duende.BFF.Yarp" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" />
</ItemGroup>

</Project>
8 changes: 4 additions & 4 deletions BFF/v4/BlazorWasm/BlazorWasm/BlazorWasm.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Duende.BFF.Blazor.Client" Version="4.1.2" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="10.0.5" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Authentication" Version="10.0.5" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="10.0.5" PrivateAssets="all" />
<PackageReference Include="Duende.BFF.Blazor.Client" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Authentication" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions BFF/v4/DPoP/DPoP.Api/DPoP.Api.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="IdentityModel" version="7.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="10.0.2" />
<PackageReference Include="Serilog.AspNetCore" Version="10.0.0" />
<PackageReference Include="Duende.IdentityModel" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" />
<PackageReference Include="Serilog.AspNetCore" />
</ItemGroup>
</Project>
5 changes: 3 additions & 2 deletions BFF/v4/DPoP/DPoP.Api/DPoP/DPoPExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
// Copyright (c) Duende Software. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

using System.Buffers.Text;
using System.Text.Json;
using IdentityModel;
using Duende.IdentityModel;
using Microsoft.AspNetCore.Authentication;
using Microsoft.IdentityModel.Tokens;

Expand Down Expand Up @@ -75,7 +76,7 @@ public static string CreateThumbprintCnf(this JsonWebKey jwk)
/// </summary>
public static string CreateThumbprint(this JsonWebKey jwk)
{
var jkt = Base64Url.Encode(jwk.ComputeJwkThumbprint());
var jkt = Base64Url.EncodeToString(jwk.ComputeJwkThumbprint());
return jkt;
}
}
9 changes: 4 additions & 5 deletions BFF/v4/DPoP/DPoP.Api/DPoP/DPoPJwtBearerEvents.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@
// Licensed under the MIT License. See LICENSE in the project root for license information.

using System.Text;
using IdentityModel;
using Duende.IdentityModel;
using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.Extensions.Options;
using Microsoft.Net.Http.Headers;
using static IdentityModel.OidcConstants;

namespace DPoP.Api;

Expand Down Expand Up @@ -75,7 +74,7 @@ public override async Task TokenValidated(TokenValidatedContext context)
else if (dpopOptions.Mode == DPoPMode.DPoPAndBearer)
{
// if the scheme used was not DPoP, then it was Bearer
// and if a access token was presented with a cnf, then the
// and if a access token was presented with a cnf, then the
// client should have sent it as DPoP, so we fail the request
if (context.Principal.HasClaim(x => x.Type == JwtClaimTypes.Confirmation))
{
Expand Down Expand Up @@ -138,14 +137,14 @@ public override Task Challenge(JwtBearerChallengeContext context)
if (context.HttpContext.Items.ContainsKey("DPoP-Nonce"))
{
var nonce = context.HttpContext.Items["DPoP-Nonce"] as string;
context.Response.Headers[HttpHeaders.DPoPNonce] = nonce;
context.Response.Headers[OidcConstants.HttpHeaders.DPoPNonce] = nonce;
}
else
{
var nonce = context.Properties.GetDPoPNonce();
if (nonce != null)
{
context.Response.Headers[HttpHeaders.DPoPNonce] = nonce;
context.Response.Headers[OidcConstants.HttpHeaders.DPoPNonce] = nonce;
}
}

Expand Down
7 changes: 4 additions & 3 deletions BFF/v4/DPoP/DPoP.Api/DPoP/DPoPProofValidator.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
// Copyright (c) Duende Software. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

using System.Buffers.Text;
using System.Security.Cryptography;
using System.Text;
using System.Text.Json;
using IdentityModel;
using Duende.IdentityModel;
using Microsoft.AspNetCore.DataProtection;
using Microsoft.Extensions.Options;
using Microsoft.IdentityModel.JsonWebTokens;
Expand Down Expand Up @@ -226,7 +227,7 @@ protected virtual async Task ValidatePayloadAsync(DPoPProofValidatonContext cont
var bytes = Encoding.UTF8.GetBytes(context.AccessToken);
var hash = sha.ComputeHash(bytes);

var accessTokenHash = Base64Url.Encode(hash);
var accessTokenHash = Base64Url.EncodeToString(hash);
if (accessTokenHash != result.AccessTokenHash)
{
result.IsError = true;
Expand Down Expand Up @@ -328,7 +329,7 @@ protected virtual async Task ValidateReplayAsync(DPoPProofValidatonContext conte
skew = dpopOptions.ServerClockSkew;
}

// we do x2 here because clock might be might be before or after, so we're making cache duration
// we do x2 here because clock might be might be before or after, so we're making cache duration
// longer than the likelyhood of proof token expiration, which is done before replay
skew *= 2;
var cacheDuration = dpopOptions.ProofTokenValidityDuration + skew;
Expand Down
6 changes: 3 additions & 3 deletions BFF/v4/DPoP/DPoP.Bff/DPoP.Bff.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="10.0.2" />
<PackageReference Include="Serilog.AspNetCore" Version="10.0.0" />
<PackageReference Include="Duende.Bff.Yarp" Version="4.1.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" />
<PackageReference Include="Serilog.AspNetCore" />
<PackageReference Include="Duende.Bff.Yarp" />
</ItemGroup>
</Project>
37 changes: 37 additions & 0 deletions BFF/v4/Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="Duende.BFF" Version="4.1.2" />
<PackageVersion Include="Duende.BFF.Blazor" Version="4.1.2" />
<PackageVersion Include="Duende.BFF.Blazor.Client" Version="4.1.2" />
<PackageVersion Include="Duende.BFF.Yarp" Version="4.1.2" />
<PackageVersion Include="Duende.IdentityServer" Version="7.4.7" />
<PackageVersion Include="Duende.IdentityModel" Version="8.1.0" />
<PackageVersion Include="Microsoft.AspNetCore.Authentication.Google" Version="10.0.5" />
<PackageVersion Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="10.0.5" />
<PackageVersion Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="10.0.5" />
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly" Version="10.0.5" />
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly.Authentication" Version="10.0.5" />
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="10.0.5" />
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="10.0.5" />
<PackageVersion Include="Microsoft.AspNetCore.OpenApi" Version="10.0.5" />
<PackageVersion Include="Microsoft.AspNetCore.SpaProxy" Version="10.0.5" />
<PackageVersion Include="Microsoft.Extensions.ApiDescription.Server" Version="10.0.5" />
<PackageVersion Include="Microsoft.Extensions.Http" Version="10.0.5" />
<PackageVersion Include="Microsoft.Extensions.Http.Resilience" Version="10.2.0" />
<PackageVersion Include="Microsoft.Extensions.ServiceDiscovery" Version="10.2.0" />
<PackageVersion Include="Microsoft.Extensions.ServiceDiscovery.Yarp" Version="10.2.0" />
<PackageVersion Include="Microsoft.OpenApi" Version="2.6.1" />
<PackageVersion Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.15.0" />
<PackageVersion Include="OpenTelemetry.Extensions.Hosting" Version="1.15.0" />
<PackageVersion Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.15.0" />
<PackageVersion Include="OpenTelemetry.Instrumentation.Http" Version="1.15.0" />
<PackageVersion Include="OpenTelemetry.Instrumentation.Runtime" Version="1.15.0" />
<PackageVersion Include="Serilog.AspNetCore" Version="10.0.0" />
<PackageVersion Include="Swashbuckle.AspNetCore" Version="10.1.0" />
<PackageVersion Include="Swashbuckle.AspNetCore.SwaggerUI" Version="10.1.2" />
<PackageVersion Include="System.CommandLine" Version="2.0.2" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion BFF/v4/JsBffSample/BackendApiHost/BackendApiHost.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="10.0.2" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" />
</ItemGroup>

</Project>
6 changes: 3 additions & 3 deletions BFF/v4/JsBffSample/FrontendHost/FrontendHost.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Duende.BFF" Version="4.0.2" />
<PackageReference Include="Duende.BFF.Yarp" Version="4.0.2" />
<PackageReference Include="Duende.BFF" />
<PackageReference Include="Duende.BFF.Yarp" />

<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="10.0.2" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" />
</ItemGroup>

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

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="10.0.2" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" />
</ItemGroup>

</Project>
4 changes: 2 additions & 2 deletions BFF/v4/JsBffYarpSample/FrontendHost/FrontendHost.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Duende.BFF.Yarp" Version="4.1.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="10.0.2" />
<PackageReference Include="Duende.BFF.Yarp" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" />
</ItemGroup>

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

<ItemGroup>
<PackageReference Include="Duende.BFF" Version="4.1.2" />
<PackageReference Include="Duende.BFF" />
</ItemGroup>

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

<ItemGroup>
<PackageReference Include="Duende.IdentityServer" Version="7.4.7" />
<PackageReference Include="IdentityModel" Version="7.0.0"/>
<PackageReference Include="Serilog.AspNetCore" Version="8.0.3"/>
<PackageReference Include="Duende.IdentityServer" />
<PackageReference Include="Duende.IdentityModel"/>
<PackageReference Include="Serilog.AspNetCore"/>
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// Copyright (c) Duende Software. All rights reserved.
// See LICENSE in the project root for license information.

using Duende.IdentityModel;
using Duende.IdentityServer.Events;
using Duende.IdentityServer.Extensions;
using Duende.IdentityServer.Services;
using IdentityModel;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// Copyright (c) Duende Software. All rights reserved.
// See LICENSE in the project root for license information.

using Duende.IdentityModel;
using Duende.IdentityServer.Events;
using Duende.IdentityServer.Extensions;
using Duende.IdentityServer.Models;
using Duende.IdentityServer.Services;
using Duende.IdentityServer.Validation;
using IdentityModel;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// Copyright (c) Duende Software. All rights reserved.
// See LICENSE in the project root for license information.

using System.Buffers.Text;
using System.Text;
using System.Text.Json;
using IdentityModel;
using Microsoft.AspNetCore.Authentication;

namespace IdentityServer.Pages.Diagnostics;
Expand All @@ -18,7 +18,7 @@ public ViewModel(AuthenticateResult result)
{
if (encoded != null)
{
var bytes = Base64Url.Decode(encoded);
var bytes = Base64Url.DecodeFromChars(encoded);
var value = Encoding.UTF8.GetString(bytes);
Clients = JsonSerializer.Deserialize<string[]>(value) ?? Enumerable.Empty<string>();
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
// See LICENSE in the project root for license information.

using System.Security.Claims;
using Duende.IdentityModel;
using Duende.IdentityServer;
using Duende.IdentityServer.Events;
using Duende.IdentityServer.Services;
using Duende.IdentityServer.Test;
using IdentityModel;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

using System.Security.Claims;
using System.Text.Json;
using Duende.IdentityModel;
using Duende.IdentityServer;
using Duende.IdentityServer.Test;
using IdentityModel;

namespace IdentityServer;

Expand Down
4 changes: 2 additions & 2 deletions BFF/v4/OpenApi/OpenApi.Api1/OpenApi.Api1.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="10.0.2" />
<PackageReference Include="Microsoft.Extensions.ApiDescription.Server" Version="10.0.2">
<PackageReference Include="Microsoft.AspNetCore.OpenApi" />
<PackageReference Include="Microsoft.Extensions.ApiDescription.Server">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
2 changes: 1 addition & 1 deletion BFF/v4/OpenApi/OpenApi.Api2/OpenApi.Api2.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<ItemGroup>
<ProjectReference Include="..\OpenApi.DevServer.ServiceDefaults\OpenApi.DevServer.ServiceDefaults.csproj" />
<PackageReference Include="Microsoft.Extensions.ApiDescription.Server" Version="10.0.2">
<PackageReference Include="Microsoft.Extensions.ApiDescription.Server">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
Loading
Loading