on develop help sign in
fix the URL to use when authenticating a user
commit70143bfc1e6930f2f7c87c015b0382c9988d64ba authorAleksey Makarov <aleksey.makarov@gmail.com> dateThu 15 Sep 2016, 19:18 (10 years ago) parente486386
2 files changed+4−4
gogol/src/Network/Google/Auth/ServiceAccount.hs+1−1 gogol/src/Network/Google/Internal/Auth.hs+3−3
gogol/src/Network/Google/Auth/ServiceAccount.hs+1−1
@@ -76,7 +76,7 @@ authorizedUserToken u r = refreshRequest $
7676 <> "&refresh_token=" <> toQueryParam (fromMaybe (_userRefresh u) r)
7777 }
7878
79−-- | Obtain an 'OAuthToken' from @https://accounts.google.com/o/oauth2/token@
79+-- | Obtain an 'OAuthToken' from @https://accounts.google.com/o/oauth2/v2/auth@
8080-- by signing and sending a JSON Web Token (JWT) using the supplied 'ServiceAccount'.
8181serviceAccountToken :: (MonadIO m, MonadCatch m, AllowScopes s)
8282 => ServiceAccount
gogol/src/Network/Google/Internal/Auth.hs+3−3
@@ -245,9 +245,9 @@ instance FromJSON RefreshError where
245245 <$> o .: "error"
246246 <*> o .:? "error_description"
247247
248−-- | @https://accounts.google.com/o/oauth2/token@.
248+-- | @https://accounts.google.com/o/oauth2/v2/auth@.
249249accountsURL :: Text
250−accountsURL = "https://accounts.google.com/o/oauth2/token"
250+accountsURL = "https://accounts.google.com/o/oauth2/v2/auth"
251251
252252accountsRequest :: Client.Request
253253accountsRequest = def
@@ -256,7 +256,7 @@ accountsRequest = def
256256 , Client.secure = True
257257 , Client.checkStatus = \_ _ _ -> Nothing
258258 , Client.method = "POST"
259− , Client.path = "/o/oauth2/token"
259+ , Client.path = "/o/oauth2/v2/auth"
260260 , Client.requestHeaders =
261261 [ (hContentType, "application/x-www-form-urlencoded")
262262 ]