private static async Task AssertDoesGetAccessTokenUsingRefreshTokenCookie(IJsonServiceClient client) { var authResponse = await client.PostAsync(new Authenticate { provider = "credentials", UserName = "******", Password = "******", }); var initialAccessToken = client.GetTokenCookie(); var initialRefreshToken = client.GetRefreshTokenCookie(); Assert.That(initialAccessToken, Is.Not.Null); Assert.That(initialRefreshToken, Is.Not.Null); var request = new Secured { Name = "test" }; var response = await client.SendAsync(request); Assert.That(response.Result, Is.EqualTo(request.Name)); client.Post(new InvalidateLastAccessToken()); // JwtAuthProvider.PrintDump(initialAccessToken); // JwtAuthProvider.PrintDump(initialRefreshToken); response = await client.SendAsync(request); Assert.That(response.Result, Is.EqualTo(request.Name)); var latestAccessToken = client.GetTokenCookie(); Assert.That(latestAccessToken, Is.Not.EqualTo(initialAccessToken)); }