From 6b91396c897b0f98a5ac1eb268d248326a4fb384 Mon Sep 17 00:00:00 2001 From: Jared Snider Date: Thu, 15 May 2025 22:55:21 -0400 Subject: [PATCH] PM-20532 - Add TODOs --- src/Core/Context/CurrentContext.cs | 3 +++ src/Core/Tools/Services/Implementations/SendService.cs | 2 ++ test/Identity.IntegrationTest/Endpoints/IdentityServerTests.cs | 1 + 3 files changed, 6 insertions(+) diff --git a/src/Core/Context/CurrentContext.cs b/src/Core/Context/CurrentContext.cs index cbd90055b0..3ba5497af6 100644 --- a/src/Core/Context/CurrentContext.cs +++ b/src/Core/Context/CurrentContext.cs @@ -174,6 +174,9 @@ public class CurrentContext : ICurrentContext ServiceAccountOrganizationId = new Guid(GetClaimValue(claimsDict, Claims.Organization)); } + // TODO: IdentityClientType.Send should maybe be wired up here. Have further discussion with Justin + // Create an ExtensionMethod on HttpContext to get the send id from the subject claim + DeviceIdentifier = GetClaimValue(claimsDict, Claims.Device); if (Enum.TryParse(GetClaimValue(claimsDict, Claims.DeviceType), out DeviceType deviceType)) diff --git a/src/Core/Tools/Services/Implementations/SendService.cs b/src/Core/Tools/Services/Implementations/SendService.cs index e09787d7eb..31a573ef0f 100644 --- a/src/Core/Tools/Services/Implementations/SendService.cs +++ b/src/Core/Tools/Services/Implementations/SendService.cs @@ -203,6 +203,8 @@ public class SendService : ISendService { return (false, false, false); } + + // TODO: this is what we will be using to validate password in SendAccessGrantValidator if (!string.IsNullOrWhiteSpace(send.Password)) { if (string.IsNullOrWhiteSpace(password)) diff --git a/test/Identity.IntegrationTest/Endpoints/IdentityServerTests.cs b/test/Identity.IntegrationTest/Endpoints/IdentityServerTests.cs index c29f25983d..192ad87240 100644 --- a/test/Identity.IntegrationTest/Endpoints/IdentityServerTests.cs +++ b/test/Identity.IntegrationTest/Endpoints/IdentityServerTests.cs @@ -352,6 +352,7 @@ public class IdentityServerTests : IClassFixture } + // TODO: use this as example to call send token endpoint [Theory, BitAutoData] public async Task TokenEndpoint_GrantTypeClientCredentials_AsOrganization_Success(Organization organization, Bit.Core.Entities.OrganizationApiKey organizationApiKey) {