Initial version
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
using EonaCat.gRPC.Proto;
|
||||
|
||||
namespace EonaCat.gRPC.Client;
|
||||
|
||||
public interface ITokenProvider
|
||||
{
|
||||
Task<AuthenticationResponse> GetTokenAsync();
|
||||
}
|
||||
|
||||
public class AppTokenProvider : ITokenProvider
|
||||
{
|
||||
private AuthenticationResponse _token;
|
||||
public async Task<AuthenticationResponse> GetTokenAsync()
|
||||
{
|
||||
if (_token == null)
|
||||
_token = new AuthenticationResponse { AccessToken = "test", ExpiresIn = 300 };
|
||||
return _token;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user