feat: подключил ms sso

This commit is contained in:
2026-05-06 14:35:02 +03:00
parent cf5c13ff84
commit e2094cf0e9
9 changed files with 107 additions and 25 deletions
@@ -3,6 +3,7 @@ using UniVerse.Domain.Enums;
namespace UniVerse.Application.DTOs.Auth;
public record AuthResponse(string AccessToken, DateTime ExpiresAt, UserAuthDto User);
public record AuthResult(AuthResponse Response, string RefreshToken);
public record UserAuthDto(int Id, string Email, string? DisplayName, UserRole Role);
@@ -5,9 +5,9 @@ namespace UniVerse.Application.Interfaces;
public interface IAuthService
{
Task<AuthResponse> LoginWithMicrosoftAsync(string authorizationCode);
Task<AuthResponse> DevLoginAsync(string email, string? displayName, Domain.Enums.UserRole role);
Task<AuthResponse> RefreshTokenAsync(string refreshToken);
Task<AuthResult> LoginWithMicrosoftAsync(string authorizationCode);
Task<AuthResult> DevLoginAsync(string email, string? displayName, Domain.Enums.UserRole role);
Task<AuthResult> RefreshTokenAsync(string refreshToken);
Task RevokeRefreshTokenAsync(string refreshToken);
Task<UserDto> GetCurrentUserAsync(int userId);
}