-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIUserAuthService.cs
More file actions
47 lines (41 loc) · 1.39 KB
/
IUserAuthService.cs
File metadata and controls
47 lines (41 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
using ProjectVG.Application.Models.User;
using ProjectVG.Common.Models;
namespace ProjectVG.Application.Services.Auth
{
/// <summary>
/// 인증 및 토큰 관리 서비스
/// JWT 토큰 생성, 검증, 갱신 및 OAuth 로그인 처리를 담당
/// </summary>
public interface IAuthService
{
/// <summary>
/// Guest 로그인 처리
/// </summary>
Task<AuthResult> GuestLoginAsync(string guestId);
/// <summary>
/// 리프레시 토큰을 사용하여 새로운 액세스 토큰 발급
/// </summary>
Task<AuthResult> RefreshAccessTokenAsync(string? refreshToken);
/// <summary>
/// 사용자 로그아웃 처리 (리프레시 토큰 무효화)
/// </summary>
Task<bool> LogoutAsync(string? refreshToken);
}
public interface IOAuth2AuthService
{
/// <summary>
/// OAuth2 제공자를 통한 로그인 처리
/// </summary>
Task<AuthResult> OAuth2LoginAsync(string provider, string providerUserId, string email);
}
/// <summary>
/// 인증 처리 결과를 담는 클래스
/// </summary>
public class AuthResult
{
/// <summary>JWT 토큰 정보</summary>
public TokenResponse Tokens { get; set; } = null!;
/// <summary>사용자 정보</summary>
public UserDto? User { get; set; }
}
}