aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Web/TangoWebClient.cs
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2019-02-24 13:38:47 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2019-02-24 13:38:47 +0200
commit64b768178dc9e64293a52c1b6d2631709af9502a (patch)
tree6b7782fdbbbab4f734a1cb499cca03728c4f8f69 /Software/Visual_Studio/Tango.Web/TangoWebClient.cs
parent028ab0e5cc2699ceec3e04b1eeab5f56b9b38083 (diff)
downloadTango-64b768178dc9e64293a52c1b6d2631709af9502a.tar.gz
Tango-64b768178dc9e64293a52c1b6d2631709af9502a.zip
Removed all refresh tokens use :/
Diffstat (limited to 'Software/Visual_Studio/Tango.Web/TangoWebClient.cs')
-rw-r--r--Software/Visual_Studio/Tango.Web/TangoWebClient.cs21
1 files changed, 2 insertions, 19 deletions
diff --git a/Software/Visual_Studio/Tango.Web/TangoWebClient.cs b/Software/Visual_Studio/Tango.Web/TangoWebClient.cs
index 08fc19099..1d2f9fc8e 100644
--- a/Software/Visual_Studio/Tango.Web/TangoWebClient.cs
+++ b/Software/Visual_Studio/Tango.Web/TangoWebClient.cs
@@ -70,29 +70,13 @@ namespace Tango.Web
return response;
}
- private async Task Renew()
- {
- var response = await _client.PostJson<RenewTokenRequest, RenewTokenResponse>(GetActionAddress("Renew"), new RenewTokenRequest()
- {
- RefreshToken = WebToken.RefreshToken,
- });
-
- Token = response.AccessToken;
- _client.AuthenticationToken = Token;
-
- WebToken = WebToken.FromToken(Token);
-
- IsAuthenticated = true;
- }
-
protected virtual async Task<TResponse> Post<TRequest, TResponse>(String action, TRequest request) where TRequest : class, IWebRequestMessage where TResponse : class, IWebResponseMessage
{
if (IsAuthenticated)
{
if (DateTime.UtcNow >= WebToken.Expiration)
{
- await Renew();
- //await Login(_lastLoginRequest);
+ await Login(_lastLoginRequest);
}
}
@@ -105,8 +89,7 @@ namespace Tango.Web
{
try
{
- //await Login(_lastLoginRequest);
- await Renew();
+ await Login(_lastLoginRequest);
var response = await _client.PostJson<TRequest, TResponse>(GetActionAddress(action), request);
return response;
}