1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-14 06:50:47 -05:00

PM-20532 - ProfileService.cs - add todos & comments

This commit is contained in:
Jared Snider 2025-05-30 17:16:17 -04:00
parent 12c716ada9
commit 6e4da2cf13
No known key found for this signature in database
GPG Key ID: A149DDD612516286

View File

@ -40,12 +40,16 @@ public class ProfileService : IProfileService
{
var existingClaims = context.Subject.Claims;
// TODO: add comment for why we can exempt send client logic from other logic below
if (context.Client.ClientId == BitwardenClient.Send)
{
// preserve all claims that were already on context.Subject
// which includes the ones added by the SendAccessGrantValidator
context.IssuedClaims.AddRange(existingClaims);
return;
// If we ever get more clients that need to skip the logic below, consider a configuration
// based approach like context.Client.Properties.TryGetValue("skipProfileService");
}
// Whenever IdentityServer issues a new access token or services a UserInfo request, it calls
@ -88,8 +92,6 @@ public class ProfileService : IProfileService
}
}
// TODO: this will be called for the SendAccessGrantValidator and no security token stamp will exist.
public async Task IsActiveAsync(IsActiveContext context)
{
if (context.Client.ClientId == BitwardenClient.Send)