diff --git a/test/Microsoft.AspNet.Authentication.Test/OpenIdConnect/OpenIdConnectAuthenticationHandlerForTestingAuthenticate.cs b/test/Microsoft.AspNet.Authentication.Test/OpenIdConnect/OpenIdConnectAuthenticationHandlerForTestingAuthenticate.cs index 46c6d6f131..bf6d128c5e 100644 --- a/test/Microsoft.AspNet.Authentication.Test/OpenIdConnect/OpenIdConnectAuthenticationHandlerForTestingAuthenticate.cs +++ b/test/Microsoft.AspNet.Authentication.Test/OpenIdConnect/OpenIdConnectAuthenticationHandlerForTestingAuthenticate.cs @@ -27,14 +27,14 @@ namespace Microsoft.AspNet.Authentication.Tests.OpenIdConnect return await base.HandleUnauthorizedAsync(context); } - protected override async Task RedeemAuthorizationCodeAsync(string authorizationCode, string redirectUri) + protected override Task RedeemAuthorizationCodeAsync(string authorizationCode, string redirectUri) { var jsonResponse = new JObject(); jsonResponse.Add(OpenIdConnectParameterNames.IdToken, "test token"); - return new OpenIdConnectTokenEndpointResponse(jsonResponse); + return Task.FromResult(new OpenIdConnectTokenEndpointResponse(jsonResponse)); } - protected override async Task GetUserInformationAsync(AuthenticationProperties properties, OpenIdConnectMessage message, AuthenticationTicket ticket) + protected override Task GetUserInformationAsync(AuthenticationProperties properties, OpenIdConnectMessage message, AuthenticationTicket ticket) { var claimsIdentity = (ClaimsIdentity)ticket.Principal.Identity; if (claimsIdentity == null) @@ -42,7 +42,7 @@ namespace Microsoft.AspNet.Authentication.Tests.OpenIdConnect claimsIdentity = new ClaimsIdentity(); } claimsIdentity.AddClaim(new Claim("test claim", "test value")); - return new AuthenticationTicket(new ClaimsPrincipal(claimsIdentity), ticket.Properties, ticket.AuthenticationScheme); + return Task.FromResult(new AuthenticationTicket(new ClaimsPrincipal(claimsIdentity), ticket.Properties, ticket.AuthenticationScheme)); } } }