diff --git a/docs/architecture/service-orchestration-boundary.md b/docs/architecture/service-orchestration-boundary.md
new file mode 100644
index 0000000..5fb9d1d
--- /dev/null
+++ b/docs/architecture/service-orchestration-boundary.md
@@ -0,0 +1,13 @@
+# Thalos Service Orchestration Boundary
+
+## Purpose
+Constrain thalos-service to orchestration responsibilities after thalos-domain extraction.
+
+## Service Responsibilities
+- Coordinate identity use-case flow
+- Delegate policy/token decisions to thalos-domain abstractions
+- Adapt transport contracts
+
+## Prohibited Responsibilities
+- Owning identity decision policies
+- Owning persistence decision concerns
diff --git a/docs/migration/domain-delegation-plan.md b/docs/migration/domain-delegation-plan.md
new file mode 100644
index 0000000..d62f61d
--- /dev/null
+++ b/docs/migration/domain-delegation-plan.md
@@ -0,0 +1,10 @@
+# Thalos Domain Delegation Plan
+
+## Delegation Model
+- Use cases invoke thalos-domain abstractions for policy and token decisions.
+- Service adapters retain technical contract mapping only.
+
+## Transition Steps
+1. Replace in-service decision branches with domain calls.
+2. Keep service contract shapes stable.
+3. Validate orchestration-only responsibilities.
diff --git a/docs/migration/identity-service-regression-checks.md b/docs/migration/identity-service-regression-checks.md
new file mode 100644
index 0000000..37bf0a8
--- /dev/null
+++ b/docs/migration/identity-service-regression-checks.md
@@ -0,0 +1,10 @@
+# Identity Service Regression Checks
+
+## Checks
+- Service no longer contains policy/token decision branches.
+- Service still orchestrates required dependencies.
+- Transport contract outputs remain stable.
+
+## Evidence
+- Updated architecture docs
+- Delegation map confirmation
diff --git a/src/Thalos.Service.Application/Adapters/IIdentityCapabilityContractAdapter.cs b/src/Thalos.Service.Application/Adapters/IIdentityCapabilityContractAdapter.cs
deleted file mode 100644
index 8ac98a7..0000000
--- a/src/Thalos.Service.Application/Adapters/IIdentityCapabilityContractAdapter.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-using Thalos.Service.Identity.Abstractions.Contracts;
-
-namespace Thalos.Service.Application.Adapters;
-
-///
-/// Defines adapter boundary for integrating identity contracts into policy use cases.
-///
-public interface IIdentityCapabilityContractAdapter
-{
- ///
- /// Creates a transport-neutral context request for policy evaluation.
- ///
- /// Identity policy request.
- /// Identity policy context request.
- IdentityPolicyContextRequest CreatePolicyContext(EvaluateIdentityPolicyRequest identityRequest);
-
- ///
- /// Maps policy context response into identity policy response.
- ///
- /// Identity policy request.
- /// Identity policy context response.
- /// Identity policy response.
- EvaluateIdentityPolicyResponse MapPolicyResponse(
- EvaluateIdentityPolicyRequest identityRequest,
- IdentityPolicyContextResponse contextResponse);
-}
diff --git a/src/Thalos.Service.Application/Adapters/IIdentityPolicyGrpcContractAdapter.cs b/src/Thalos.Service.Application/Adapters/IIdentityPolicyGrpcContractAdapter.cs
index 1eee486..d34f77c 100644
--- a/src/Thalos.Service.Application/Adapters/IIdentityPolicyGrpcContractAdapter.cs
+++ b/src/Thalos.Service.Application/Adapters/IIdentityPolicyGrpcContractAdapter.cs
@@ -1,5 +1,5 @@
using Thalos.Service.Application.Grpc;
-using Thalos.Service.Identity.Abstractions.Contracts;
+using BuildingBlock.Identity.Contracts.Requests;
namespace Thalos.Service.Application.Adapters;
diff --git a/src/Thalos.Service.Application/Adapters/IdentityCapabilityContractAdapter.cs b/src/Thalos.Service.Application/Adapters/IdentityCapabilityContractAdapter.cs
deleted file mode 100644
index 45c8f37..0000000
--- a/src/Thalos.Service.Application/Adapters/IdentityCapabilityContractAdapter.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-using Thalos.Service.Identity.Abstractions.Contracts;
-
-namespace Thalos.Service.Application.Adapters;
-
-///
-/// Default adapter implementation for identity policy contract composition.
-///
-public sealed class IdentityCapabilityContractAdapter : IIdentityCapabilityContractAdapter
-{
- ///
- public IdentityPolicyContextRequest CreatePolicyContext(EvaluateIdentityPolicyRequest identityRequest)
- {
- return new IdentityPolicyContextRequest(
- identityRequest.SubjectId,
- identityRequest.TenantId,
- identityRequest.PermissionCode);
- }
-
- ///
- public EvaluateIdentityPolicyResponse MapPolicyResponse(
- EvaluateIdentityPolicyRequest identityRequest,
- IdentityPolicyContextResponse contextResponse)
- {
- return new EvaluateIdentityPolicyResponse(
- identityRequest.SubjectId,
- identityRequest.PermissionCode,
- contextResponse.ContextSatisfied);
- }
-}
diff --git a/src/Thalos.Service.Application/Adapters/IdentityPolicyGrpcContractAdapter.cs b/src/Thalos.Service.Application/Adapters/IdentityPolicyGrpcContractAdapter.cs
index fe4435d..ebfde41 100644
--- a/src/Thalos.Service.Application/Adapters/IdentityPolicyGrpcContractAdapter.cs
+++ b/src/Thalos.Service.Application/Adapters/IdentityPolicyGrpcContractAdapter.cs
@@ -1,5 +1,5 @@
using Thalos.Service.Application.Grpc;
-using Thalos.Service.Identity.Abstractions.Contracts;
+using BuildingBlock.Identity.Contracts.Requests;
namespace Thalos.Service.Application.Adapters;
diff --git a/src/Thalos.Service.Application/DependencyInjection/ThalosServiceRuntimeServiceCollectionExtensions.cs b/src/Thalos.Service.Application/DependencyInjection/ThalosServiceRuntimeServiceCollectionExtensions.cs
index 9d53fc0..27d9023 100644
--- a/src/Thalos.Service.Application/DependencyInjection/ThalosServiceRuntimeServiceCollectionExtensions.cs
+++ b/src/Thalos.Service.Application/DependencyInjection/ThalosServiceRuntimeServiceCollectionExtensions.cs
@@ -1,6 +1,7 @@
using Core.Blueprint.Common.DependencyInjection;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
+using Thalos.Domain.Decisions;
using Thalos.DAL.DependencyInjection;
using Thalos.Service.Application.Adapters;
using Thalos.Service.Application.Ports;
@@ -22,8 +23,9 @@ public static class ThalosServiceRuntimeServiceCollectionExtensions
{
services.AddBlueprintRuntimeCore();
services.AddThalosDalRuntime();
+ services.TryAddSingleton();
+ services.TryAddSingleton();
- services.TryAddSingleton();
services.TryAddSingleton();
services.TryAddSingleton();
diff --git a/src/Thalos.Service.Application/Ports/IIdentityPolicyContextReadPort.cs b/src/Thalos.Service.Application/Ports/IIdentityPolicyContextReadPort.cs
index 45f8b4e..3801c54 100644
--- a/src/Thalos.Service.Application/Ports/IIdentityPolicyContextReadPort.cs
+++ b/src/Thalos.Service.Application/Ports/IIdentityPolicyContextReadPort.cs
@@ -1,4 +1,5 @@
-using Thalos.Service.Identity.Abstractions.Contracts;
+using BuildingBlock.Identity.Contracts.Requests;
+using Thalos.Domain.Contracts;
namespace Thalos.Service.Application.Ports;
@@ -12,5 +13,5 @@ public interface IIdentityPolicyContextReadPort
///
/// Identity policy context request.
/// Identity policy context response.
- Task ReadPolicyContextAsync(IdentityPolicyContextRequest request);
+ Task ReadPolicyContextAsync(IdentityPolicyContextRequest request);
}
diff --git a/src/Thalos.Service.Application/Ports/IIdentityTokenReadPort.cs b/src/Thalos.Service.Application/Ports/IIdentityTokenReadPort.cs
index c513044..fc4b8bf 100644
--- a/src/Thalos.Service.Application/Ports/IIdentityTokenReadPort.cs
+++ b/src/Thalos.Service.Application/Ports/IIdentityTokenReadPort.cs
@@ -1,4 +1,5 @@
-using Thalos.Service.Identity.Abstractions.Contracts;
+using BuildingBlock.Identity.Contracts.Requests;
+using Thalos.Domain.Contracts;
namespace Thalos.Service.Application.Ports;
@@ -12,5 +13,5 @@ public interface IIdentityTokenReadPort
///
/// Token request contract.
/// Token response contract.
- Task IssueTokenAsync(IssueIdentityTokenRequest request);
+ Task ReadTokenAsync(IssueIdentityTokenRequest request);
}
diff --git a/src/Thalos.Service.Application/Ports/IdentityPolicyContextReadPortDalAdapter.cs b/src/Thalos.Service.Application/Ports/IdentityPolicyContextReadPortDalAdapter.cs
index 1e1fe2e..d66caa9 100644
--- a/src/Thalos.Service.Application/Ports/IdentityPolicyContextReadPortDalAdapter.cs
+++ b/src/Thalos.Service.Application/Ports/IdentityPolicyContextReadPortDalAdapter.cs
@@ -1,7 +1,8 @@
using Core.Blueprint.Common.Runtime;
+using BuildingBlock.Identity.Contracts.Requests;
using Thalos.DAL.Contracts;
using Thalos.DAL.Repositories;
-using Thalos.Service.Identity.Abstractions.Contracts;
+using Thalos.Domain.Contracts;
namespace Thalos.Service.Application.Ports;
@@ -13,7 +14,7 @@ public sealed class IdentityPolicyContextReadPortDalAdapter(
IBlueprintSystemClock clock) : IIdentityPolicyContextReadPort
{
///
- public async Task ReadPolicyContextAsync(IdentityPolicyContextRequest request)
+ public async Task ReadPolicyContextAsync(IdentityPolicyContextRequest request)
{
var policyLookupRequest = new IdentityPolicyLookupRequest(
CreateEnvelope(),
@@ -24,7 +25,11 @@ public sealed class IdentityPolicyContextReadPortDalAdapter(
var policyRecord = await identityRepository.ReadIdentityPolicyAsync(policyLookupRequest);
if (policyRecord is null)
{
- return new IdentityPolicyContextResponse(request.SubjectId, request.PermissionCode, false);
+ return new IdentityPolicyContextData(
+ request.SubjectId,
+ request.PermissionCode,
+ false,
+ []);
}
var permissionSetRequest = new IdentityPermissionSetLookupRequest(
@@ -33,13 +38,15 @@ public sealed class IdentityPolicyContextReadPortDalAdapter(
request.TenantId);
var permissions = await identityRepository.ReadPermissionSetAsync(permissionSetRequest);
- var permissionMatched = permissions.Any(permission =>
- string.Equals(permission.PermissionCode, request.PermissionCode, StringComparison.OrdinalIgnoreCase));
+ var grantedPermissions = permissions
+ .Select(permission => permission.PermissionCode)
+ .ToArray();
- return new IdentityPolicyContextResponse(
+ return new IdentityPolicyContextData(
request.SubjectId,
request.PermissionCode,
- policyRecord.ContextSatisfied && permissionMatched);
+ policyRecord.ContextSatisfied,
+ grantedPermissions);
}
private IdentityContractEnvelope CreateEnvelope()
diff --git a/src/Thalos.Service.Application/Ports/IdentityTokenReadPortDalAdapter.cs b/src/Thalos.Service.Application/Ports/IdentityTokenReadPortDalAdapter.cs
index 0cc98ed..834ec48 100644
--- a/src/Thalos.Service.Application/Ports/IdentityTokenReadPortDalAdapter.cs
+++ b/src/Thalos.Service.Application/Ports/IdentityTokenReadPortDalAdapter.cs
@@ -1,7 +1,8 @@
using Core.Blueprint.Common.Runtime;
+using BuildingBlock.Identity.Contracts.Requests;
using Thalos.DAL.Contracts;
using Thalos.DAL.Repositories;
-using Thalos.Service.Identity.Abstractions.Contracts;
+using Thalos.Domain.Contracts;
namespace Thalos.Service.Application.Ports;
@@ -13,7 +14,7 @@ public sealed class IdentityTokenReadPortDalAdapter(
IBlueprintSystemClock clock) : IIdentityTokenReadPort
{
///
- public async Task IssueTokenAsync(IssueIdentityTokenRequest request)
+ public async Task ReadTokenAsync(IssueIdentityTokenRequest request)
{
var lookupRequest = new IdentityTokenLookupRequest(
CreateEnvelope(),
@@ -23,10 +24,10 @@ public sealed class IdentityTokenReadPortDalAdapter(
var tokenRecord = await identityRepository.ReadIdentityTokenAsync(lookupRequest);
if (tokenRecord is null)
{
- return new IssueIdentityTokenResponse(string.Empty, 0);
+ return new IdentityTokenData(null, null);
}
- return new IssueIdentityTokenResponse(tokenRecord.Token, tokenRecord.ExpiresInSeconds);
+ return new IdentityTokenData(tokenRecord.Token, tokenRecord.ExpiresInSeconds);
}
private IdentityContractEnvelope CreateEnvelope()
diff --git a/src/Thalos.Service.Application/Thalos.Service.Application.csproj b/src/Thalos.Service.Application/Thalos.Service.Application.csproj
index bdb0db0..e2f9a55 100644
--- a/src/Thalos.Service.Application/Thalos.Service.Application.csproj
+++ b/src/Thalos.Service.Application/Thalos.Service.Application.csproj
@@ -6,7 +6,8 @@
+
+
-
diff --git a/src/Thalos.Service.Application/UseCases/EvaluateIdentityPolicyUseCase.cs b/src/Thalos.Service.Application/UseCases/EvaluateIdentityPolicyUseCase.cs
index 4255e88..ef645c4 100644
--- a/src/Thalos.Service.Application/UseCases/EvaluateIdentityPolicyUseCase.cs
+++ b/src/Thalos.Service.Application/UseCases/EvaluateIdentityPolicyUseCase.cs
@@ -1,6 +1,7 @@
-using Thalos.Service.Application.Adapters;
+using BuildingBlock.Identity.Contracts.Requests;
+using BuildingBlock.Identity.Contracts.Responses;
using Thalos.Service.Application.Ports;
-using Thalos.Service.Identity.Abstractions.Contracts;
+using Thalos.Domain.Decisions;
namespace Thalos.Service.Application.UseCases;
@@ -8,16 +9,16 @@ namespace Thalos.Service.Application.UseCases;
/// Default orchestration implementation for identity policy evaluation.
///
public sealed class EvaluateIdentityPolicyUseCase(
- IIdentityCapabilityContractAdapter contractAdapter,
+ IIdentityPolicyDecisionService decisionService,
IIdentityPolicyContextReadPort policyContextReadPort)
: IEvaluateIdentityPolicyUseCase
{
///
public async Task HandleAsync(EvaluateIdentityPolicyRequest request)
{
- var policyContextRequest = contractAdapter.CreatePolicyContext(request);
- var policyContextResponse = await policyContextReadPort.ReadPolicyContextAsync(policyContextRequest);
+ var policyContextRequest = decisionService.BuildPolicyContextRequest(request);
+ var policyContextData = await policyContextReadPort.ReadPolicyContextAsync(policyContextRequest);
- return contractAdapter.MapPolicyResponse(request, policyContextResponse);
+ return decisionService.Evaluate(request, policyContextData);
}
}
diff --git a/src/Thalos.Service.Application/UseCases/IEvaluateIdentityPolicyUseCase.cs b/src/Thalos.Service.Application/UseCases/IEvaluateIdentityPolicyUseCase.cs
index e503608..f51c09a 100644
--- a/src/Thalos.Service.Application/UseCases/IEvaluateIdentityPolicyUseCase.cs
+++ b/src/Thalos.Service.Application/UseCases/IEvaluateIdentityPolicyUseCase.cs
@@ -1,4 +1,5 @@
-using Thalos.Service.Identity.Abstractions.Contracts;
+using BuildingBlock.Identity.Contracts.Requests;
+using BuildingBlock.Identity.Contracts.Responses;
namespace Thalos.Service.Application.UseCases;
diff --git a/src/Thalos.Service.Application/UseCases/IIssueIdentityTokenUseCase.cs b/src/Thalos.Service.Application/UseCases/IIssueIdentityTokenUseCase.cs
index a7a4a06..34ddc03 100644
--- a/src/Thalos.Service.Application/UseCases/IIssueIdentityTokenUseCase.cs
+++ b/src/Thalos.Service.Application/UseCases/IIssueIdentityTokenUseCase.cs
@@ -1,4 +1,5 @@
-using Thalos.Service.Identity.Abstractions.Contracts;
+using BuildingBlock.Identity.Contracts.Requests;
+using BuildingBlock.Identity.Contracts.Responses;
namespace Thalos.Service.Application.UseCases;
diff --git a/src/Thalos.Service.Application/UseCases/IssueIdentityTokenUseCase.cs b/src/Thalos.Service.Application/UseCases/IssueIdentityTokenUseCase.cs
index a94c145..2fb6caf 100644
--- a/src/Thalos.Service.Application/UseCases/IssueIdentityTokenUseCase.cs
+++ b/src/Thalos.Service.Application/UseCases/IssueIdentityTokenUseCase.cs
@@ -1,17 +1,22 @@
+using BuildingBlock.Identity.Contracts.Requests;
+using BuildingBlock.Identity.Contracts.Responses;
using Thalos.Service.Application.Ports;
-using Thalos.Service.Identity.Abstractions.Contracts;
+using Thalos.Domain.Decisions;
namespace Thalos.Service.Application.UseCases;
///
/// Default orchestration implementation for identity token issuance.
///
-public sealed class IssueIdentityTokenUseCase(IIdentityTokenReadPort readPort)
+public sealed class IssueIdentityTokenUseCase(
+ IIdentityTokenReadPort readPort,
+ IIdentityTokenDecisionService decisionService)
: IIssueIdentityTokenUseCase
{
///
- public Task HandleAsync(IssueIdentityTokenRequest request)
+ public async Task HandleAsync(IssueIdentityTokenRequest request)
{
- return readPort.IssueTokenAsync(request);
+ var tokenData = await readPort.ReadTokenAsync(request);
+ return decisionService.BuildIssuedTokenResponse(tokenData);
}
}
diff --git a/src/Thalos.Service.Grpc/Services/IdentityRuntimeGrpcService.cs b/src/Thalos.Service.Grpc/Services/IdentityRuntimeGrpcService.cs
index 948cfb6..84c5991 100644
--- a/src/Thalos.Service.Grpc/Services/IdentityRuntimeGrpcService.cs
+++ b/src/Thalos.Service.Grpc/Services/IdentityRuntimeGrpcService.cs
@@ -2,7 +2,7 @@ using Grpc.Core;
using Thalos.Service.Application.Adapters;
using Thalos.Service.Application.Grpc;
using Thalos.Service.Application.UseCases;
-using Thalos.Service.Identity.Abstractions.Contracts;
+using BuildingBlock.Identity.Contracts.Requests;
namespace Thalos.Service.Grpc.Services;
diff --git a/src/Thalos.Service.Grpc/Thalos.Service.Grpc.csproj b/src/Thalos.Service.Grpc/Thalos.Service.Grpc.csproj
index 4db7838..c10fc1d 100644
--- a/src/Thalos.Service.Grpc/Thalos.Service.Grpc.csproj
+++ b/src/Thalos.Service.Grpc/Thalos.Service.Grpc.csproj
@@ -14,6 +14,5 @@
-
diff --git a/tests/Thalos.Service.Application.UnitTests/EvaluateIdentityPolicyUseCaseTests.cs b/tests/Thalos.Service.Application.UnitTests/EvaluateIdentityPolicyUseCaseTests.cs
index 8cb71a9..b9f7697 100644
--- a/tests/Thalos.Service.Application.UnitTests/EvaluateIdentityPolicyUseCaseTests.cs
+++ b/tests/Thalos.Service.Application.UnitTests/EvaluateIdentityPolicyUseCaseTests.cs
@@ -1,7 +1,9 @@
-using Thalos.Service.Application.Adapters;
+using BuildingBlock.Identity.Contracts.Requests;
+using BuildingBlock.Identity.Contracts.Responses;
using Thalos.Service.Application.Ports;
using Thalos.Service.Application.UseCases;
-using Thalos.Service.Identity.Abstractions.Contracts;
+using Thalos.Domain.Contracts;
+using Thalos.Domain.Decisions;
namespace Thalos.Service.Application.UnitTests;
@@ -11,7 +13,7 @@ public class EvaluateIdentityPolicyUseCaseTests
public async Task HandleAsync_WhenCalled_UsesIdentityContractsAndReturnsMappedResponse()
{
var useCase = new EvaluateIdentityPolicyUseCase(
- new FakeIdentityCapabilityContractAdapter(),
+ new FakeIdentityPolicyDecisionService(),
new FakeIdentityPolicyContextReadPort());
var response = await useCase.HandleAsync(new EvaluateIdentityPolicyRequest("subject-1", "tenant-1", "perm.read"));
@@ -21,29 +23,33 @@ public class EvaluateIdentityPolicyUseCaseTests
Assert.True(response.IsAllowed);
}
- private sealed class FakeIdentityCapabilityContractAdapter : IIdentityCapabilityContractAdapter
+ private sealed class FakeIdentityPolicyDecisionService : IIdentityPolicyDecisionService
{
- public IdentityPolicyContextRequest CreatePolicyContext(EvaluateIdentityPolicyRequest identityRequest)
+ public IdentityPolicyContextRequest BuildPolicyContextRequest(EvaluateIdentityPolicyRequest request)
{
- return new IdentityPolicyContextRequest(identityRequest.SubjectId, identityRequest.TenantId, identityRequest.PermissionCode);
+ return new IdentityPolicyContextRequest(request.SubjectId, request.TenantId, request.PermissionCode);
}
- public EvaluateIdentityPolicyResponse MapPolicyResponse(
- EvaluateIdentityPolicyRequest identityRequest,
- IdentityPolicyContextResponse contextResponse)
+ public EvaluateIdentityPolicyResponse Evaluate(
+ EvaluateIdentityPolicyRequest request,
+ IdentityPolicyContextData policyContextData)
{
return new EvaluateIdentityPolicyResponse(
- identityRequest.SubjectId,
- identityRequest.PermissionCode,
- contextResponse.ContextSatisfied);
+ request.SubjectId,
+ request.PermissionCode,
+ policyContextData.ContextSatisfied);
}
}
private sealed class FakeIdentityPolicyContextReadPort : IIdentityPolicyContextReadPort
{
- public Task ReadPolicyContextAsync(IdentityPolicyContextRequest request)
+ public Task ReadPolicyContextAsync(IdentityPolicyContextRequest request)
{
- return Task.FromResult(new IdentityPolicyContextResponse(request.SubjectId, request.PermissionCode, true));
+ return Task.FromResult(new IdentityPolicyContextData(
+ request.SubjectId,
+ request.PermissionCode,
+ true,
+ [request.PermissionCode]));
}
}
}
diff --git a/tests/Thalos.Service.Application.UnitTests/IssueIdentityTokenUseCaseTests.cs b/tests/Thalos.Service.Application.UnitTests/IssueIdentityTokenUseCaseTests.cs
index 50685bf..49282b3 100644
--- a/tests/Thalos.Service.Application.UnitTests/IssueIdentityTokenUseCaseTests.cs
+++ b/tests/Thalos.Service.Application.UnitTests/IssueIdentityTokenUseCaseTests.cs
@@ -1,6 +1,8 @@
+using BuildingBlock.Identity.Contracts.Requests;
using Thalos.Service.Application.Ports;
using Thalos.Service.Application.UseCases;
-using Thalos.Service.Identity.Abstractions.Contracts;
+using Thalos.Domain.Contracts;
+using Thalos.Domain.Decisions;
namespace Thalos.Service.Application.UnitTests;
@@ -9,8 +11,9 @@ public class IssueIdentityTokenUseCaseTests
[Fact]
public async Task HandleAsync_WhenCalled_DelegatesToReadPort()
{
+ var decisionService = new IdentityTokenDecisionService();
var port = new FakeIdentityTokenReadPort();
- var useCase = new IssueIdentityTokenUseCase(port);
+ var useCase = new IssueIdentityTokenUseCase(port, decisionService);
var response = await useCase.HandleAsync(new IssueIdentityTokenRequest("user-1", "tenant-1"));
@@ -20,9 +23,9 @@ public class IssueIdentityTokenUseCaseTests
private sealed class FakeIdentityTokenReadPort : IIdentityTokenReadPort
{
- public Task IssueTokenAsync(IssueIdentityTokenRequest request)
+ public Task ReadTokenAsync(IssueIdentityTokenRequest request)
{
- return Task.FromResult(new IssueIdentityTokenResponse("token-123", 3600));
+ return Task.FromResult(new IdentityTokenData("token-123", 3600));
}
}
}
diff --git a/tests/Thalos.Service.Application.UnitTests/RuntimeWiringTests.cs b/tests/Thalos.Service.Application.UnitTests/RuntimeWiringTests.cs
index fee3f25..ca99bce 100644
--- a/tests/Thalos.Service.Application.UnitTests/RuntimeWiringTests.cs
+++ b/tests/Thalos.Service.Application.UnitTests/RuntimeWiringTests.cs
@@ -1,9 +1,9 @@
using Microsoft.Extensions.DependencyInjection;
+using BuildingBlock.Identity.Contracts.Requests;
using Thalos.Service.Application.Adapters;
using Thalos.Service.Application.DependencyInjection;
using Thalos.Service.Application.Grpc;
using Thalos.Service.Application.UseCases;
-using Thalos.Service.Identity.Abstractions.Contracts;
namespace Thalos.Service.Application.UnitTests;
diff --git a/tests/Thalos.Service.Application.UnitTests/Thalos.Service.Application.UnitTests.csproj b/tests/Thalos.Service.Application.UnitTests/Thalos.Service.Application.UnitTests.csproj
index a08db62..0453bd8 100644
--- a/tests/Thalos.Service.Application.UnitTests/Thalos.Service.Application.UnitTests.csproj
+++ b/tests/Thalos.Service.Application.UnitTests/Thalos.Service.Application.UnitTests.csproj
@@ -17,6 +17,5 @@
-