Blazor & WASM in combination to get statistics from Spotify API for performing the song analysis. With separate microservices for auth, Spotify, user data tracking, and application, connected through gRPC with Polly.
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

AuthClientService.cs 770B

1234567891011121314151617181920212223242526272829
  1. using Grpc.Net.Client;
  2. using GrpcShared.DTO.Auth;
  3. using GrpcShared.Interfaces;
  4. using NemAnBlazor.Services.Interfaces;
  5. using ProtoBuf.Grpc.Client;
  6. using GrpcShared;
  7. namespace NemAnBlazor.Services
  8. {
  9. public class AuthClientService : IAuthClientService
  10. {
  11. private IAuthService _serviceClient;
  12. public AuthClientService(GrpcChannel grpcChannel)
  13. {
  14. _serviceClient = grpcChannel.CreateGrpcService<IAuthService>();
  15. }
  16. public async Task<TokenResponse> GetAccessToken(TokenRequest request)
  17. {
  18. return await _serviceClient.GetAccessToken(request);
  19. }
  20. public async Task<CodeRequest> GetAuthParams()
  21. {
  22. return await _serviceClient.GetAuthParams();
  23. }
  24. }
  25. }