using Microsoft.SharePoint.Client; using SharepointToolbox.Core.Models; namespace SharepointToolbox.Services; /// /// Abstraction over SessionManager, enabling unit testing of ViewModels /// without live MSAL/SharePoint connections. /// public interface ISessionManager { /// Returns an existing ClientContext or creates one via interactive login. Task GetOrCreateContextAsync(TenantProfile profile, CancellationToken ct = default); /// Clears the cached session for the given tenant URL. Task ClearSessionAsync(string tenantUrl); /// Returns true if an authenticated ClientContext exists for this tenantUrl. bool IsAuthenticated(string tenantUrl); }