Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove unnecessary distinct method #1581

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
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