15 lines
625 B
C#
15 lines
625 B
C#
using Microsoft.SharePoint.Client;
|
|
using SharepointToolbox.Web.Core.Models;
|
|
|
|
namespace SharepointToolbox.Web.Services;
|
|
|
|
public interface ISessionManager
|
|
{
|
|
Task<ClientContext> GetOrCreateContextAsync(TenantProfile profile, CancellationToken ct = default);
|
|
Task<ClientContext> GetOrCreateContextAsync(string siteUrl, TenantProfile profile, CancellationToken ct = default);
|
|
Task<(string Token, DateTimeOffset ExpiresAt)> GetAccessTokenWithExpiryAsync(string scope, CancellationToken ct = default);
|
|
Task ClearSessionAsync(string tenantUrl);
|
|
Task ClearAllAsync();
|
|
bool IsAuthenticated(string tenantUrl);
|
|
}
|