From 0ab5cdc6ad38666bd142c6834f36997717c6a547 Mon Sep 17 00:00:00 2001 From: Hao Kung Date: Thu, 3 Mar 2016 14:01:24 -0800 Subject: [PATCH] Fix bad rebase --- samples/SocialSample/Startup.cs | 8 ++++---- .../Google/GoogleMiddlewareTests.cs | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/samples/SocialSample/Startup.cs b/samples/SocialSample/Startup.cs index 4ab304c32e..ed3f09a14a 100644 --- a/samples/SocialSample/Startup.cs +++ b/samples/SocialSample/Startup.cs @@ -322,10 +322,10 @@ namespace CookieSample await context.Response.WriteAsync("Tokens:
"); - await context.Response.WriteAsync("Access Token: " + await AuthenticationToken.GetTokenAsync(context, CookieAuthenticationDefaults.AuthenticationScheme, "access_token") + "
"); - await context.Response.WriteAsync("Refresh Token: " + await AuthenticationToken.GetTokenAsync(context, CookieAuthenticationDefaults.AuthenticationScheme, "refresh_token") + "
"); - await context.Response.WriteAsync("Token Type: " + await AuthenticationToken.GetTokenAsync(context, CookieAuthenticationDefaults.AuthenticationScheme, "token_type") + "
"); - await context.Response.WriteAsync("expires_at: " + await AuthenticationToken.GetTokenAsync(context, CookieAuthenticationDefaults.AuthenticationScheme, "expires_at") + "
"); + await context.Response.WriteAsync("Access Token: " + await context.Authentication.GetTokenAsync("access_token") + "
"); + await context.Response.WriteAsync("Refresh Token: " + await context.Authentication.GetTokenAsync("refresh_token") + "
"); + await context.Response.WriteAsync("Token Type: " + await context.Authentication.GetTokenAsync("token_type") + "
"); + await context.Response.WriteAsync("expires_at: " + await context.Authentication.GetTokenAsync("expires_at") + "
"); await context.Response.WriteAsync("Logout"); await context.Response.WriteAsync(""); }); diff --git a/test/Microsoft.AspNetCore.Authentication.Test/Google/GoogleMiddlewareTests.cs b/test/Microsoft.AspNetCore.Authentication.Test/Google/GoogleMiddlewareTests.cs index 6a3442e826..96bb574fb3 100644 --- a/test/Microsoft.AspNetCore.Authentication.Test/Google/GoogleMiddlewareTests.cs +++ b/test/Microsoft.AspNetCore.Authentication.Test/Google/GoogleMiddlewareTests.cs @@ -793,7 +793,7 @@ namespace Microsoft.AspNetCore.Authentication.Google { var authContext = new AuthenticateContext(TestExtensions.CookieAuthenticationScheme); await context.Authentication.AuthenticateAsync(authContext); - var tokens = AuthenticationToken.GetTokens(new AuthenticationProperties(authContext.Properties)); + var tokens = new AuthenticationProperties(authContext.Properties).GetTokens(); res.Describe(tokens); } else if (req.Path == new PathString("/me"))