Skip to content

Commit

Permalink
add some debug logging to user info request validator for server side…
Browse files Browse the repository at this point in the history
… sessions
  • Loading branch information
brockallen committed Jun 7, 2023
1 parent 9ac7e92 commit 3e17366
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,15 @@ public async Task<UserInfoRequestValidationResult> ValidateRequestAsync(string a

if (sessions.Count == 1)
{
_logger.LogDebug("Loading subject claims from server-side session store");
subject = sessions.First().AuthenticationTicket.Principal;
}
}
}

if (subject == null)
{
_logger.LogDebug("Loading subject claims from access token");
// this falls back to prior behavior which provides the best we can for the subject based on claims from the access token
var claims = tokenResult.Claims.Where(x => !Constants.Filters.ProtocolClaimsFilter.Contains(x.Type));
subject = Principal.Create("UserInfo", claims.ToArray());
Expand Down

0 comments on commit 3e17366

Please sign in to comment.