feat: добавил отображение аватарки
This commit is contained in:
1 parent
34e450815b
commit
038f0d89a6
22 files changed
+598
-28
No files matched your search
@@ -9,5 +9,6 @@ public interface IAuthService
|
||||
Task<AuthResult> DevLoginAsync(string email, string? displayName, IReadOnlyCollection<Domain.Enums.UserRole> roles, string? ipAddress = null);
|
||||
Task<AuthResult> RefreshTokenAsync(string refreshToken);
|
||||
Task RevokeRefreshTokenAsync(string refreshToken);
|
||||
Task RemoveMicrosoftTokenCacheAsync(int userId);
|
||||
Task<CurrentUserDto> GetCurrentUserAsync(int userId);
|
||||
}
|
||||
@@ -6,6 +6,11 @@ public interface IMicrosoftAuthClient
|
||||
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);
|
||||
public record MicrosoftTokenResult(string IdToken, byte[]? TokenCache = null, string? AccountId = null);
|
||||
public record MicrosoftPhotoResult(byte[] Content, string ContentType);
|
||||
Reference in new issue
Block a user