Removed authenticate-oauth-supported flag
This commit is contained in:
parent
a7e9695e26
commit
883ae7ae70
@ -56,7 +56,7 @@ authOAuth name ident reqUrl accUrl authUrl key sec = AuthPlugin name dispatch lo
|
|||||||
oaTok <- runFormGet' $ stringInput "oauth_token"
|
oaTok <- runFormGet' $ stringInput "oauth_token"
|
||||||
let reqTok = Credential [ ("oauth_verifier", pack verifier), ("oauth_token", pack oaTok)
|
let reqTok = Credential [ ("oauth_verifier", pack verifier), ("oauth_token", pack oaTok)
|
||||||
]
|
]
|
||||||
accTok <- liftIO $ getTokenCredential oauth reqTok
|
accTok <- liftIO $ getAccessToken oauth reqTok
|
||||||
let crId = unpack $ fromJust $ lookup (pack ident) $ unCredential accTok
|
let crId = unpack $ fromJust $ lookup (pack ident) $ unCredential accTok
|
||||||
creds = Creds name crId $ map (unpack *** unpack) $ unCredential accTok
|
creds = Creds name crId $ map (unpack *** unpack) $ unCredential accTok
|
||||||
setCreds True creds
|
setCreds True creds
|
||||||
@ -84,4 +84,4 @@ authTwitter = authOAuth "twitter"
|
|||||||
"http://twitter.com/oauth/authorize"
|
"http://twitter.com/oauth/authorize"
|
||||||
|
|
||||||
twitterUrl :: AuthRoute
|
twitterUrl :: AuthRoute
|
||||||
twitterUrl = oauthUrl "twitter"
|
twitterUrl = oauthUrl "twitter"
|
||||||
|
|||||||
@ -13,17 +13,13 @@ homepage: http://docs.yesodweb.com/
|
|||||||
|
|
||||||
flag ghc7
|
flag ghc7
|
||||||
|
|
||||||
flag authenticate-oauth-supported
|
|
||||||
Description: Whether authenticate package supports OAuth or not.
|
|
||||||
Default: False
|
|
||||||
|
|
||||||
library
|
library
|
||||||
if flag(ghc7)
|
if flag(ghc7)
|
||||||
build-depends: base >= 4.3 && < 5
|
build-depends: base >= 4.3 && < 5
|
||||||
cpp-options: -DGHC7
|
cpp-options: -DGHC7
|
||||||
else
|
else
|
||||||
build-depends: base >= 4 && < 4.3
|
build-depends: base >= 4 && < 4.3
|
||||||
build-depends: authenticate >= 0.8 && < 0.9
|
build-depends: authenticate >= 0.8.1 && < 0.9
|
||||||
, bytestring >= 0.9.1.4 && < 0.10
|
, bytestring >= 0.9.1.4 && < 0.10
|
||||||
, yesod-core >= 0.7 && < 0.8
|
, yesod-core >= 0.7 && < 0.8
|
||||||
, wai >= 0.3 && < 0.4
|
, wai >= 0.3 && < 0.4
|
||||||
@ -47,11 +43,6 @@ library
|
|||||||
, SHA >= 1.4.1.3 && < 1.5
|
, SHA >= 1.4.1.3 && < 1.5
|
||||||
, http-enumerator >= 0.3.1 && < 0.4
|
, http-enumerator >= 0.3.1 && < 0.4
|
||||||
|
|
||||||
if flag(authenticate-oauth-supported)
|
|
||||||
build-depends: authenticate >= 0.8.0.1 && < 0.9
|
|
||||||
else
|
|
||||||
build-depends: authenticate-oauth >= 0.1 && < 0.2
|
|
||||||
|
|
||||||
exposed-modules: Yesod.Helpers.Auth
|
exposed-modules: Yesod.Helpers.Auth
|
||||||
Yesod.Helpers.Auth.Dummy
|
Yesod.Helpers.Auth.Dummy
|
||||||
Yesod.Helpers.Auth.Email
|
Yesod.Helpers.Auth.Email
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user