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.
19 lines
462 B
C#
19 lines
462 B
C#
namespace TarninaHub.Application.Dtos;
|
|
|
|
public sealed record RegisterRequest(string Phone, string? Email, string Password);
|
|
|
|
public sealed record LoginRequest(string Phone, string Password);
|
|
|
|
public sealed record UserResponse(
|
|
string Id,
|
|
string Phone,
|
|
string? Email,
|
|
string Role,
|
|
string? OrganizationId);
|
|
|
|
public sealed record TokenResponse(
|
|
string AccessToken,
|
|
string TokenType,
|
|
DateTimeOffset ExpiresAt,
|
|
UserResponse User);
|