Skip to content

Commit

Permalink
Refactor fix
Browse files Browse the repository at this point in the history
Apply code review suggestions.
  • Loading branch information
martincostello committed Nov 8, 2023
1 parent c2143b5 commit 7869cbc
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using System.Security.Claims;
using System.Text.Encodings.Web;
using System.Text.Json;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.WebUtilities;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
Expand Down Expand Up @@ -96,12 +97,11 @@ protected override string BuildChallengeUrl([NotNull] AuthenticationProperties p

query["response_type"] = "Assertion";

// Remove the query and re-add with the edit so that the parameters are not duplicated.
// Replace the query with the edit so that the parameters are not duplicated.
// See https://github.com/dotnet/aspnetcore/issues/47054 for more context.
challengeUri.Query = string.Empty;
challengeUrl = challengeUri.Uri.ToString();
challengeUri.Query = QueryString.Create(query).Value;

return QueryHelpers.AddQueryString(challengeUrl, query);
return challengeUri.Uri.AbsoluteUri;
}

private static partial class Log
Expand Down

0 comments on commit 7869cbc

Please sign in to comment.