mirror of
https://github.com/DuendeSoftware/products
synced 2026-05-24 09:28:24 +00:00
Add null-check for client before coordinating session lifecycle
Ensure that the client object is not null before attempting to determine its session coordination behavior.
This commit is contained in:
parent
97927d9219
commit
c908d15677
1 changed files with 10 additions and 7 deletions
|
|
@ -137,14 +137,17 @@ public class DefaultSessionCoordinationService : ISessionCoordinationService
|
|||
{
|
||||
var client = await ClientStore.FindClientByIdAsync(clientId); // i don't think we care if it's an enabled client at this point
|
||||
|
||||
var shouldCoordinate =
|
||||
client.CoordinateLifetimeWithUserSession == true ||
|
||||
(Options.Authentication.CoordinateClientLifetimesWithUserSession && client.CoordinateLifetimeWithUserSession != false);
|
||||
|
||||
if (shouldCoordinate)
|
||||
if (client != null)
|
||||
{
|
||||
// this implies they should also be contacted for backchannel logout below
|
||||
clientsToCoordinate.Add(clientId);
|
||||
var shouldCoordinate =
|
||||
client.CoordinateLifetimeWithUserSession == true ||
|
||||
(Options.Authentication.CoordinateClientLifetimesWithUserSession && client.CoordinateLifetimeWithUserSession != false);
|
||||
|
||||
if (shouldCoordinate)
|
||||
{
|
||||
// this implies they should also be contacted for backchannel logout below
|
||||
clientsToCoordinate.Add(clientId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue