using Tiku.Application.Auth;
using Tiku.Application.Security;
using Tiku.Domain.Tenancy;

namespace Tiku.Infrastructure.Security;

internal sealed class RequestAccessValidator(IAuthSessionStore sessionStore) : IRequestAccessValidator
{
    public Task<AuthSessionValidationResult?> ValidateAsync(
        Guid sessionId,
        Guid userId,
        AuthRealm realm,
        Guid? tenantId,
        CancellationToken cancellationToken = default)
    {
        return sessionStore.ValidateAccessSessionAsync(sessionId, userId, realm, tenantId, cancellationToken);
    }
}