Add signup/signin with backend-issued JWT (Argon2 passwords in SurrealDB), role-based authorization policies, per-user data access levels, consent register and read audit log. Protect user endpoints and record sensitive reads.
16 lines
557 B
C#
16 lines
557 B
C#
using TarninaHub.Application.Dtos;
|
|
using TarninaHub.Application.Models;
|
|
|
|
namespace TarninaHub.Application.Abstractions;
|
|
|
|
public interface IUserService
|
|
{
|
|
Task<UserAccount?> FindByPhoneAsync(string phone, CancellationToken cancellationToken);
|
|
|
|
Task<UserAccount?> GetByIdAsync(string userId, CancellationToken cancellationToken);
|
|
|
|
Task<UserAccount?> CreateAsync(RegisterRequest request, string role, CancellationToken cancellationToken);
|
|
|
|
Task<bool> VerifyCredentialsAsync(string phone, string password, CancellationToken cancellationToken);
|
|
}
|