19 lines
1.0 KiB
C#
19 lines
1.0 KiB
C#
|
|
using FutureMailAPI.DTOs;
|
||
|
|
using FutureMailAPI.Models;
|
||
|
|
|
||
|
|
namespace FutureMailAPI.Services
|
||
|
|
{
|
||
|
|
public interface IOAuthService
|
||
|
|
{
|
||
|
|
Task<ApiResponse<OAuthClientSecretDto>> CreateClientAsync(int userId, OAuthClientCreateDto createDto);
|
||
|
|
Task<ApiResponse<OAuthClientDto>> GetClientAsync(string clientId);
|
||
|
|
Task<ApiResponse<OAuthAuthorizationResponseDto>> AuthorizeAsync(int userId, OAuthAuthorizationRequestDto request);
|
||
|
|
Task<ApiResponse<OAuthTokenResponseDto>> ExchangeCodeForTokenAsync(OAuthTokenRequestDto request);
|
||
|
|
Task<ApiResponse<OAuthTokenResponseDto>> RefreshTokenAsync(OAuthTokenRequestDto request);
|
||
|
|
Task<ApiResponse<bool>> RevokeTokenAsync(string token);
|
||
|
|
Task<ApiResponse<bool>> ValidateTokenAsync(string token);
|
||
|
|
Task<OAuthAccessToken?> GetAccessTokenAsync(string token);
|
||
|
|
Task<OAuthClient?> GetClientByCredentialsAsync(string clientId, string clientSecret);
|
||
|
|
Task<ApiResponse<OAuthTokenResponseDto>> LoginAsync(OAuthLoginDto loginDto);
|
||
|
|
}
|
||
|
|
}
|