Skip to content

Commit

Permalink
code clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
damienbod committed Aug 29, 2024
1 parent a2111f4 commit 4753925
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ public async Task<bool> IsLoggedOutAsync(string sub, string sid)
if (logoutSession != null)
{
var session = JsonSerializer.Deserialize<BackchannelLogoutSession>(logoutSession);
matches = session.IsMatch(sub, sid);
if (session != null)
{
matches = session.IsMatch(sub, sid);
}

_logger.LogInformation("BC Logout session exists T/F {matches} : {sub}, sid: {sid}", matches, sub, sid);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ public async Task<bool> IsLoggedOutAsync(string? sub, string? sid)
if (logoutSession != null)
{
var session = JsonSerializer.Deserialize<BackchannelLogoutSession>(logoutSession);
matches = session!.IsMatch(sub, sid);
if (session != null)
{
matches = session.IsMatch(sub, sid);
}

_logger.LogInformation("BC Logout session exists T/F {matches} : {sub}, sid: {sid}", matches, sub, sid);
}

Expand Down

0 comments on commit 4753925

Please sign in to comment.