packages feed

hoauth2 1.16.1 → 1.16.2

raw patch · 2 files changed

+97/−120 lines, 2 filesdep ~mustachePVP ok

version bump matches the API change (PVP)

Dependency ranges changed: mustache

API changes (from Hackage documentation)

Files

example/Keys.hs view
@@ -1,75 +1,69 @@ {-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE QuasiQuotes #-}+{-# LANGUAGE QuasiQuotes       #-}  module Keys where -import Data.ByteString (ByteString)-import Network.OAuth.OAuth2-import URI.ByteString.QQ+import           Data.ByteString                ( ByteString )+import           Network.OAuth.OAuth2+import           URI.ByteString.QQ  weiboKey :: OAuth2-weiboKey =-  OAuth2-    { oauthClientId = "xxxxxxxxxxxxxxx",-      oauthClientSecret = Just "xxxxxxxxxxxxxxxxxxxxxx",-      oauthCallback = Just [uri|http://127.0.0.1:9988/oauthCallback|],-      oauthOAuthorizeEndpoint = [uri|https://api.weibo.com/oauth2/authorize|],-      oauthAccessTokenEndpoint = [uri|https://api.weibo.com/oauth2/access_token|]-    }+weiboKey = OAuth2+  { oauthClientId            = "xxxxxxxxxxxxxxx"+  , oauthClientSecret        = Just "xxxxxxxxxxxxxxxxxxxxxx"+  , oauthCallback            = Just [uri|http://127.0.0.1:9988/oauthCallback|]+  , oauthOAuthorizeEndpoint  = [uri|https://api.weibo.com/oauth2/authorize|]+  , oauthAccessTokenEndpoint = [uri|https://api.weibo.com/oauth2/access_token|]+  }  -- | http://developer.github.com/v3/oauth/ githubKey :: OAuth2-githubKey =-  OAuth2-    { oauthClientId = "xxxxxxxxxxxxxxx",-      oauthClientSecret = Just "xxxxxxxxxxxxxxxxxxxxxx",-      oauthCallback = Just [uri|http://127.0.0.1:9988/githubCallback|],-      oauthOAuthorizeEndpoint = [uri|https://github.com/login/oauth/authorize|],-      oauthAccessTokenEndpoint =-        [uri|https://github.com/login/oauth/access_token|]-    }+githubKey = OAuth2+  { oauthClientId            = "xxxxxxxxxxxxxxx"+  , oauthClientSecret        = Just "xxxxxxxxxxxxxxxxxxxxxx"+  , oauthCallback            = Just [uri|http://127.0.0.1:9988/githubCallback|]+  , oauthOAuthorizeEndpoint  = [uri|https://github.com/login/oauth/authorize|]+  , oauthAccessTokenEndpoint =+    [uri|https://github.com/login/oauth/access_token|]+  }  -- | oauthCallback = Just "https://developers.google.com/oauthplayground" googleKey :: OAuth2-googleKey =-  OAuth2-    { oauthClientId = "xxxxxxxxxxxxxxx.apps.googleusercontent.com",-      oauthClientSecret = Just "xxxxxxxxxxxxxxxxxxxxxx",-      oauthCallback = Just [uri|http://127.0.0.1:9988/googleCallback|],-      oauthOAuthorizeEndpoint = [uri|https://accounts.google.com/o/oauth2/auth|],-      oauthAccessTokenEndpoint = [uri|https://www.googleapis.com/oauth2/v3/token|]-    }+googleKey = OAuth2+  { oauthClientId            = "xxxxxxxxxxxxxxx.apps.googleusercontent.com"+  , oauthClientSecret        = Just "xxxxxxxxxxxxxxxxxxxxxx"+  , oauthCallback            = Just [uri|http://127.0.0.1:9988/googleCallback|]+  , oauthOAuthorizeEndpoint  = [uri|https://accounts.google.com/o/oauth2/auth|]+  , oauthAccessTokenEndpoint = [uri|https://www.googleapis.com/oauth2/v3/token|]+  }  facebookKey :: OAuth2-facebookKey =-  OAuth2-    { oauthClientId = "xxxxxxxxxxxxxxx",-      oauthClientSecret = Just "xxxxxxxxxxxxxxxxxxxxxx",-      oauthCallback = Just [uri|http://t.haskellcn.org/cb|],-      oauthOAuthorizeEndpoint = [uri|https://www.facebook.com/dialog/oauth|],-      oauthAccessTokenEndpoint =-        [uri|https://graph.facebook.com/v2.3/oauth/access_token|]-    }+facebookKey = OAuth2+  { oauthClientId            = "xxxxxxxxxxxxxxx"+  , oauthClientSecret        = Just "xxxxxxxxxxxxxxxxxxxxxx"+  , oauthCallback            = Just [uri|http://t.haskellcn.org/cb|]+  , oauthOAuthorizeEndpoint  = [uri|https://www.facebook.com/dialog/oauth|]+  , oauthAccessTokenEndpoint =+    [uri|https://graph.facebook.com/v2.3/oauth/access_token|]+  }  doubanKey :: OAuth2-doubanKey =-  OAuth2-    { oauthClientId = "xxxxxxxxxxxxxxx",-      oauthClientSecret = Just "xxxxxxxxxxxxxxxxxxxxxx",-      oauthCallback = Just [uri|http://localhost:9999/oauthCallback|],-      oauthOAuthorizeEndpoint = [uri|https://www.douban.com/service/auth2/auth|],-      oauthAccessTokenEndpoint = [uri|https://www.douban.com/service/auth2/token|]-    }+doubanKey = OAuth2+  { oauthClientId            = "xxxxxxxxxxxxxxx"+  , oauthClientSecret        = Just "xxxxxxxxxxxxxxxxxxxxxx"+  , oauthCallback            = Just [uri|http://localhost:9999/oauthCallback|]+  , oauthOAuthorizeEndpoint  = [uri|https://www.douban.com/service/auth2/auth|]+  , oauthAccessTokenEndpoint = [uri|https://www.douban.com/service/auth2/token|]+  }  fitbitKey :: OAuth2-fitbitKey =-  OAuth2-    { oauthClientId = "xxxxxx",-      oauthClientSecret = Just "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",-      oauthCallback = Just [uri|http://localhost:9988/oauth2/callback|],-      oauthOAuthorizeEndpoint = [uri|https://www.fitbit.com/oauth2/authorize|],-      oauthAccessTokenEndpoint = [uri|https://api.fitbit.com/oauth2/token|]-    }+fitbitKey = OAuth2+  { oauthClientId            = "xxxxxx"+  , oauthClientSecret        = Just "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"+  , oauthCallback            = Just [uri|http://localhost:9988/oauth2/callback|]+  , oauthOAuthorizeEndpoint  = [uri|https://www.fitbit.com/oauth2/authorize|]+  , oauthAccessTokenEndpoint = [uri|https://api.fitbit.com/oauth2/token|]+  }  -- fix key from your application edit page -- https://stackapps.com/apps/oauth@@ -77,76 +71,59 @@ stackexchangeAppKey = "xxxxxx"  stackexchangeKey :: OAuth2-stackexchangeKey =-  OAuth2-    { oauthClientId = "xx",-      oauthClientSecret = Just "xxxxxxxxxxxxxxx",-      oauthCallback = Just [uri|http://c.haskellcn.org/cb|],-      oauthOAuthorizeEndpoint = [uri|https://stackexchange.com/oauth|],-      oauthAccessTokenEndpoint =-        [uri|https://stackexchange.com/oauth/access_token|]-    }-+stackexchangeKey = OAuth2+  { oauthClientId            = "xx"+  , oauthClientSecret        = Just "xxxxxxxxxxxxxxx"+  , oauthCallback            = Just [uri|http://c.haskellcn.org/cb|]+  , oauthOAuthorizeEndpoint  = [uri|https://stackexchange.com/oauth|]+  , oauthAccessTokenEndpoint =+    [uri|https://stackexchange.com/oauth/access_token|]+  } dropboxKey :: OAuth2-dropboxKey =-  OAuth2-    { oauthClientId = "xxx",-      oauthClientSecret = Just "xxx",-      oauthCallback = Just [uri|http://localhost:9988/oauth2/callback|],-      oauthOAuthorizeEndpoint = [uri|https://www.dropbox.com/1/oauth2/authorize|],-      oauthAccessTokenEndpoint = [uri|https://api.dropboxapi.com/oauth2/token|]-    }+dropboxKey = OAuth2+  { oauthClientId            = "xxx"+  , oauthClientSecret        = Just "xxx"+  , oauthCallback            = Just [uri|http://localhost:9988/oauth2/callback|]+  , oauthOAuthorizeEndpoint  = [uri|https://www.dropbox.com/1/oauth2/authorize|]+  , oauthAccessTokenEndpoint = [uri|https://api.dropboxapi.com/oauth2/token|]+  }  oktaKey :: OAuth2-oktaKey =-  OAuth2-    { oauthClientId = "0oa54gpOiDEZTA2rk0g4",-      oauthClientSecret = Just "0_Vo1pBmK6tOSl25V1mEOyGDunakBCBDFGnCvHcF",-      oauthCallback = Just [uri|http://localhost:9988/oauth2/callback|],-      oauthOAuthorizeEndpoint =-        [uri|http://rain.okta1.com:1802/oauth2/v1/authorize|],-      oauthAccessTokenEndpoint = [uri|http://rain.okta1.com:1802/oauth2/v1/token|]-    }--oktaKey1 :: OAuth2-oktaKey1 =-  OAuth2-    { oauthClientId = "0oa3pfim3hCbfCqaw0g7",-      oauthClientSecret = Just "sc0J-DXuJgB3sApT3xMr6_jS2kJ6QXhp3RxBTszo",-      oauthCallback = Just [uri|http://localhost:9988/oauth2/callback|],-      oauthOAuthorizeEndpoint =-        [uri|https://hw2.trexcloud.com/oauth2/v1/authorize|],-      oauthAccessTokenEndpoint = [uri|https://hw2.trexcloud.com/oauth2/v1/token|]-    }+oktaKey = OAuth2+  { oauthClientId            = "xxx"+  , oauthClientSecret        = Just "xxx"+  , oauthCallback            = Just [uri|http://localhost:9988/oauth2/callback|]+  , oauthOAuthorizeEndpoint  =+    [uri|https://dev-148986.oktapreview.com/oauth2/v1/authorize|]+  , oauthAccessTokenEndpoint =+    [uri|https://dev-148986.oktapreview.com/oauth2/v1/token|]+  }  azureADKey :: OAuth2-azureADKey =-  OAuth2-    { oauthClientId = "xxx",-      oauthClientSecret = Just "xxx",-      oauthCallback = Just [uri|http://localhost:9988/oauth2/callback|],-      oauthOAuthorizeEndpoint =-        [uri|https://login.windows.net/common/oauth2/authorize|],-      oauthAccessTokenEndpoint =-        [uri|https://login.windows.net/common/oauth2/token|]-    }+azureADKey = OAuth2+  { oauthClientId            = "xxx"+  , oauthClientSecret        = Just "xxx"+  , oauthCallback            = Just [uri|http://localhost:9988/oauth2/callback|]+  , oauthOAuthorizeEndpoint  =+    [uri|https://login.windows.net/common/oauth2/authorize|]+  , oauthAccessTokenEndpoint =+    [uri|https://login.windows.net/common/oauth2/token|]+  }  zohoKey :: OAuth2-zohoKey =-  OAuth2-    { oauthClientId = "xxx",-      oauthClientSecret = Just "xxx",-      oauthCallback = Just [uri|http://localhost:9988/oauth2/callback|],-      oauthOAuthorizeEndpoint = [uri|https://accounts.zoho.com/oauth/v2/auth|],-      oauthAccessTokenEndpoint = [uri|https://accounts.zoho.com/oauth/v2/token|]-    }+zohoKey = OAuth2+  { oauthClientId            = "xxx"+  , oauthClientSecret        = Just "xxx"+  , oauthCallback            = Just [uri|http://localhost:9988/oauth2/callback|]+  , oauthOAuthorizeEndpoint  = [uri|https://accounts.zoho.com/oauth/v2/auth|]+  , oauthAccessTokenEndpoint = [uri|https://accounts.zoho.com/oauth/v2/token|]+  }  auth0Key :: OAuth2-auth0Key =-  OAuth2-    { oauthClientId = "tmEEsqOamfVZM3Z62vK91OQpmPQLlMAk",-      oauthClientSecret = Just "6JA_iHEjsVqsLemAMRLoUaOvL-tJSjA31o0h6qt-dXcLEfe0OSLwDHQDwX8kq3Hy",-      oauthCallback = Just [uri|http://localhost:9988/oauth2/callback|],-      oauthOAuthorizeEndpoint = [uri|https://freizl.auth0.com/authorize|],-      oauthAccessTokenEndpoint = [uri|https://freizl.auth0.com/oauth/token|]-    }+auth0Key = OAuth2+  { oauthClientId            = "xxx"+  , oauthClientSecret        = Just "xxx"+  , oauthCallback            = Just [uri|http://localhost:9988/oauth2/callback|]+  , oauthOAuthorizeEndpoint  = [uri|https://foo.auth0.com/authorize|]+  , oauthAccessTokenEndpoint = [uri|https://foo.auth0.com/oauth/token|]+  }
hoauth2.cabal view
@@ -1,7 +1,7 @@ Cabal-version: 2.4 Name:                hoauth2 -- http://wiki.haskell.org/Package_versioning_policy-Version:             1.16.1+Version:             1.16.2  Synopsis:            Haskell OAuth2 authentication client @@ -132,7 +132,7 @@                        microlens            >= 0.4.0 && < 0.5,                        unordered-containers >= 0.2.5,                        wai-middleware-static >= 0.8.1 && < 0.10.0,-                       mustache >= 2.2.3 && < 2.4.0,+                       mustache >= 2.2.3 && < 2.5.0,                        scotty >= 0.10.0 && < 0.13,                        binary >= 0.8.3.0 && < 0.8.9,                        parsec >= 3.1.11 && < 3.2.0 ,