packages feed

hoauth2-0.5.3.1: example/Keys.hs.sample

{-# LANGUAGE OverloadedStrings #-}

module Keys where

import           Network.OAuth.OAuth2

weiboKey :: OAuth2
weiboKey = OAuth2 { oauthClientId = "xxxxxxxxxxxxxxx"
                   , oauthClientSecret = "xxxxxxxxxxxxxxxxxxxxxx"
                   , oauthCallback = Just "http://127.0.0.1:9988/oauthCallback"
                   , oauthOAuthorizeEndpoint = "https://api.weibo.com/oauth2/authorize"
                   , oauthAccessTokenEndpoint = "https://api.weibo.com/oauth2/access_token"
                   }

-- | http://developer.github.com/v3/oauth/
githubKey :: OAuth2
githubKey = OAuth2 { oauthClientId = "xxxxxxxxxxxxxxx"
                    , oauthClientSecret = "xxxxxxxxxxxxxxxxxxxxxx"
                    , oauthCallback = Just "http://127.0.0.1:9988/githubCallback"
                    , oauthOAuthorizeEndpoint = "https://github.com/login/oauth/authorize"
                    , oauthAccessTokenEndpoint = "https://github.com/login/oauth/access_token"
                    }

-- | oauthCallback = Just "https://developers.google.com/oauthplayground"
googleKey :: OAuth2
googleKey = OAuth2 { oauthClientId = "xxxxxxxxxxxxxxx.apps.googleusercontent.com"
                   , oauthClientSecret = "xxxxxxxxxxxxxxxxxxxxxx"
                   , oauthCallback = Just "http://127.0.0.1:9988/googleCallback"
                   , oauthOAuthorizeEndpoint = "https://accounts.google.com/o/oauth2/auth"
                   , oauthAccessTokenEndpoint = "https://www.googleapis.com/oauth2/v3/token"
                   }

facebookKey :: OAuth2
facebookKey = OAuth2 { oauthClientId = "xxxxxxxxxxxxxxx"
                     , oauthClientSecret = "xxxxxxxxxxxxxxxxxxxxxx"
                     , oauthCallback = Just "http://t.haskellcn.org/cb"
                     , oauthOAuthorizeEndpoint = "https://www.facebook.com/dialog/oauth"
                     , oauthAccessTokenEndpoint = "https://graph.facebook.com/v2.3/oauth/access_token"
                     }

doubanKey :: OAuth2
doubanKey = OAuth2 { oauthClientId = "xxxxxxxxxxxxxxx"
                   , oauthClientSecret = "xxxxxxxxxxxxxxxxxxxxxx"
                   , oauthCallback = Just "http://localhost:9999/oauthCallback"
                   , oauthOAuthorizeEndpoint = "https://www.douban.com/service/auth2/auth"
                   , oauthAccessTokenEndpoint = "https://www.douban.com/service/auth2/token"
                   }

fitbitKey :: OAuth2
fitbitKey = OAuth2 { oauthClientId = "xxxxxx"
                   , oauthClientSecret = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
                   , oauthCallback = Just "http://localhost:9988/oauth2/callback"
                   , oauthOAuthorizeEndpoint = "https://www.fitbit.com/oauth2/authorize"
                   , oauthAccessTokenEndpoint = "https://api.fitbit.com/oauth2/token"
                   }

stackexchangeKey :: OAuth2
stackexchangeKey = OAuth2 { oauthClientId = "xx"
                          , oauthClientSecret = "xxxxxxxxxxxxxxx"
                          , oauthCallback = Just "http://c.haskellcn.org/cb"
                          , oauthOAuthorizeEndpoint = "https://stackexchange.com/oauth"
                          , oauthAccessTokenEndpoint = "https://stackexchange.com/oauth/access_token"
                          }