forked from baron/baron-sso
감사로그 조회 에러 수정
This commit is contained in:
@@ -179,6 +179,7 @@ func AuditMiddleware(config AuditConfig) fiber.Handler {
|
||||
EventID: reqID,
|
||||
Timestamp: start,
|
||||
UserID: userID,
|
||||
TenantID: tenantID,
|
||||
SessionID: sessionID,
|
||||
EventType: fmt.Sprintf("%s %s", c.Method(), c.Path()),
|
||||
Status: statusText,
|
||||
|
||||
@@ -126,6 +126,7 @@ func TestAuditMiddleware(t *testing.T) {
|
||||
}))
|
||||
|
||||
app.Post("/test", func(c *fiber.Ctx) error {
|
||||
c.Locals("tenant_id", "tenant-a")
|
||||
c.Locals("audit_details_extra", map[string]any{
|
||||
"client_id": "rp-1",
|
||||
"client_name": "Demo App",
|
||||
@@ -145,6 +146,9 @@ func TestAuditMiddleware(t *testing.T) {
|
||||
if details["client_name"] != "Demo App" {
|
||||
return false
|
||||
}
|
||||
if log.TenantID != "tenant-a" || details["tenant_id"] != "tenant-a" {
|
||||
return false
|
||||
}
|
||||
skip, ok := details["auth_timeline_skip"].(bool)
|
||||
return ok && skip
|
||||
})).Return(nil)
|
||||
|
||||
Reference in New Issue
Block a user