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:
parent
12c716ada9
commit
6e4da2cf13
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user