on develop help sign in
Fixed a bug in BigQuery connection, where authorization string was missing 'Bearer' prefix.
d801e77Benjamin Summers
gogol/src/Network/Google/Auth.hs+1−1
@@ -183,6 +183,6 @@ authorize rq s l m = bearer <$> getToken s l m
183 bearer t = rq
183 bearer t = rq
184 { Client.requestHeaders =
184 { Client.requestHeaders =
185 ( hAuthorization
185 ( hAuthorization
186− , toHeader (_tokenAccess t)
186+ , "Bearer " <> toHeader (_tokenAccess t)
187 ) : Client.requestHeaders rq
187 ) : Client.requestHeaders rq
188 }
188 }
gogol/src/Network/Google/Internal/Auth.hs+1−1
@@ -178,7 +178,7 @@ newtype OAuthCode = OAuthCode Text
178
178
179instance ToHttpApiData OAuthCode where
179instance ToHttpApiData OAuthCode where
180 toQueryParam (OAuthCode c) = c
180 toQueryParam (OAuthCode c) = c
181− toHeader (OAuthCode c) = "Bearer " <> Text.encodeUtf8 c
181+ toHeader (OAuthCode c) = Text.encodeUtf8 c
182
182
183-- | An error thrown when attempting to read AuthN/AuthZ information.
183-- | An error thrown when attempting to read AuthN/AuthZ information.
184data AuthError
184data AuthError