17 lines
562 B
C#
17 lines
562 B
C#
using System.Security.Claims;
|
|
using SharepointToolbox.Web.Core.Models;
|
|
|
|
namespace SharepointToolbox.Web.Services.Auth;
|
|
|
|
public interface IUserService
|
|
{
|
|
/// <summary>Auto-provision on first OIDC login; update LastLogin on subsequent logins.
|
|
/// First user ever becomes Admin automatically.</summary>
|
|
Task<AppUser> ProvisionAsync(ClaimsPrincipal principal);
|
|
|
|
Task<AppUser?> GetByEmailAsync(string email);
|
|
Task<IReadOnlyList<AppUser>> GetAllAsync();
|
|
Task UpdateRoleAsync(string userId, UserRole role);
|
|
Task DeleteAsync(string userId);
|
|
}
|