From 5bca51d9198ef844720f2c7fa4663e90dc04a335 Mon Sep 17 00:00:00 2001 From: takashi uesaka Date: Fri, 31 Jul 2015 15:34:57 +0900 Subject: [PATCH] BugFix. Clear authorization header before request access token. Backlog OAuth Provider check the old token in authorization header and return 400 error. --- Owin.Security.Providers/Backlog/BacklogAuthenticationHandler.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Owin.Security.Providers/Backlog/BacklogAuthenticationHandler.cs b/Owin.Security.Providers/Backlog/BacklogAuthenticationHandler.cs index 60c784e..07f91c3 100644 --- a/Owin.Security.Providers/Backlog/BacklogAuthenticationHandler.cs +++ b/Owin.Security.Providers/Backlog/BacklogAuthenticationHandler.cs @@ -72,6 +72,7 @@ namespace Owin.Security.Providers.Backlog body.Add(new KeyValuePair("client_secret", Options.ClientSecret)); // Get token + httpClient.DefaultRequestHeaders.Authorization = null; HttpResponseMessage tokenResponse = await httpClient.PostAsync(Options.TokenEndpoint, new FormUrlEncodedContent(body)); tokenResponse.EnsureSuccessStatusCode();