Initial commit
This commit is contained in:
18
MealPlan.Api/Services/IAuthService.cs
Normal file
18
MealPlan.Api/Services/IAuthService.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using MealPlan.Api.DTOs.Auth;
|
||||
|
||||
namespace MealPlan.Api.Services;
|
||||
|
||||
public interface IAuthService
|
||||
{
|
||||
Task<AuthResult> RegisterAsync(RegisterRequestDto request, CancellationToken ct = default);
|
||||
|
||||
Task<AuthResult> LoginAsync(LoginRequestDto request, CancellationToken ct = default);
|
||||
|
||||
/// <summary>Validates and rotates a refresh token, issuing a fresh token pair.</summary>
|
||||
Task<AuthResult> RefreshAsync(string refreshToken, CancellationToken ct = default);
|
||||
|
||||
/// <summary>Revokes the supplied refresh token. Idempotent.</summary>
|
||||
void Logout(string refreshToken);
|
||||
|
||||
Task<UserInfoDto?> GetUserInfoAsync(string userId, CancellationToken ct = default);
|
||||
}
|
||||
Reference in New Issue
Block a user