Files
UniVerse/backend/UniVerse.Application/Interfaces/IMicrosoftAuthClient.cs
T
serega404 038f0d89a6
gitea-push-docker.yml (push) Invalid workflow file
Backend CI / build-and-test (push) Successful in 3m34s
Frontend CI / build-and-check (push) Failing after 21s
feat: добавил отображение аватарки
2026-10-01 00:17:16 +03:00

17 lines
761 B
C#

namespace UniVerse.Application.Interfaces;
public interface IMicrosoftAuthClient
{
Task<MicrosoftTokenResult> ExchangeAuthorizationCodeAsync(
string authorizationCode,
string redirectUri,
CancellationToken cancellationToken = default);
Task SaveTokenCacheAsync(int userId, MicrosoftTokenResult result, CancellationToken cancellationToken = default);
Task<MicrosoftPhotoResult?> GetPhotoAsync(int userId, CancellationToken cancellationToken = default);
Task RemoveTokenCacheAsync(int userId, CancellationToken cancellationToken = default);
}
public record MicrosoftTokenResult(string IdToken, byte[]? TokenCache = null, string? AccountId = null);
public record MicrosoftPhotoResult(byte[] Content, string ContentType);