Add tenant context interfaces for multi-tenant operations and user context management. Refactor logging in webhook endpoints and improve async method calls in repositories for better readability and performance.

This commit is contained in:
StellaOps Bot
2025-12-29 20:07:59 +02:00
parent 1b61c72c90
commit 7825a79083
6 changed files with 49 additions and 14 deletions

View File

@@ -0,0 +1,12 @@
namespace StellaOps.Scanner.WebService.Tenancy;
/// <summary>
/// Provides the current tenant context for multi-tenant operations.
/// </summary>
public interface ITenantContext
{
/// <summary>
/// Gets the current tenant ID.
/// </summary>
string TenantId { get; }
}

View File

@@ -0,0 +1,17 @@
namespace StellaOps.Scanner.WebService.Tenancy;
/// <summary>
/// Provides the current user context for audit and authorization.
/// </summary>
public interface IUserContext
{
/// <summary>
/// Gets the current user ID.
/// </summary>
string UserId { get; }
/// <summary>
/// Gets the current user's display name.
/// </summary>
string? DisplayName { get; }
}