using GermanApp.Application.DTOs.Auth; using GermanApp.Domain.Entities; namespace GermanApp.Application.Interfaces; /// /// Interface for authentication services. /// Part of the Application layer. /// public interface IAuthService { /// /// Registers a new user. /// /// User registration data /// Authentication response with token Task RegisterAsync(RegisterDto registerDto); /// /// Authenticates a user and returns a JWT token. /// /// User login data /// Authentication response with token Task LoginAsync(LoginDto loginDto); /// /// Gets the current authenticated user. /// /// User ID from token claims /// The user entity Task GetCurrentUserAsync(int userId); /// /// Refreshes the access token using a refresh token. /// /// The refresh token /// New access token and refresh token Task RefreshTokenAsync(string refreshToken); /// /// Revokes a refresh token. /// /// The refresh token to revoke Task RevokeRefreshTokenAsync(string refreshToken); /// /// Creates the first admin user (bootstrap). /// This is a special method that creates an admin user without requiring authentication. /// /// Admin user registration data /// Authentication response with token Task CreateAdminUserAsync(RegisterDto registerDto); /// /// Checks if an admin user already exists. /// /// True if admin user exists, false otherwise Task AdminUserExistsAsync(); }