Rocket.Chat.Net.Driver.RocketChatDriver.GetNewTokenAsync C# (CSharp) Method

GetNewTokenAsync() public method

public GetNewTokenAsync ( ) : Task>
return Task>
        public async Task<MethodResult<LoginResult>> GetNewTokenAsync()
        {
            var result = await _client.CallAsync("getNewToken", TimeoutToken).ConfigureAwait(false);
            var loginResult = result.ToObject<MethodResult<LoginResult>>(JsonSerializer);
            if (!loginResult.HasError)
            {
                await SetDriverUserInfoAsync(loginResult.Result.UserId).ConfigureAwait(false);
            }

            return loginResult;
        }