fix: resolve actor name from Logto for audit log entries
AuditService now looks up username/name/email from Logto Management API when actorEmail is null, with an in-memory cache to avoid repeated calls. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package net.siegeln.cameleer.saas.audit;
|
||||
|
||||
import net.siegeln.cameleer.saas.identity.LogtoManagementClient;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
@@ -20,11 +21,14 @@ class AuditServiceTest {
|
||||
@Mock
|
||||
private AuditRepository auditRepository;
|
||||
|
||||
@Mock
|
||||
private LogtoManagementClient logtoClient;
|
||||
|
||||
private AuditService auditService;
|
||||
|
||||
@BeforeEach
|
||||
void setUp() {
|
||||
auditService = new AuditService(auditRepository);
|
||||
auditService = new AuditService(auditRepository, logtoClient);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user