Skip to content

Commit

Permalink
Merge pull request #1581 from testfirstcoder/remove-unnecessary-disti…
Browse files Browse the repository at this point in the history
…nct-method

remove unnecessary distinct method
  • Loading branch information
josephdecock authored Dec 5, 2024
2 parents 908d3dd + e7b9279 commit b471bcc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/IdentityServer/Extensions/HttpContextExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,12 @@ internal static async Task<string> GetIdentityServerSignoutFrameCallbackUrlAsync
// if we have a logout message, then that take precedence over the current user
if (logoutMessage?.ClientIds?.Any() == true)
{
var clientIds = logoutMessage?.ClientIds;
var clientIds = logoutMessage.ClientIds;

// check if current user is same, since we might have new clients (albeit unlikely)
if (currentSubId == logoutMessage?.SubjectId)
if (currentSubId == logoutMessage.SubjectId)
{
clientIds = clientIds.Union(await userSession.GetClientListAsync());
clientIds = clientIds.Distinct();
}

endSessionMsg = new LogoutNotificationContext
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ private IEnumerable<Grant> Join(IEnumerable<Grant> first, IEnumerable<Grant> sec
var match = list.FirstOrDefault(x => x.ClientId == other.ClientId);
if (match != null)
{
match.Scopes = match.Scopes.Union(other.Scopes).Distinct();
match.Scopes = match.Scopes.Union(other.Scopes);

if (match.CreationTime > other.CreationTime)
{
Expand Down

0 comments on commit b471bcc

Please sign in to comment.