Merge remote-tracking branch 'origin/master'
Conflicts: yesod-core/yesod-core.cabal
This commit is contained in:
commit
4cce1d5a8f
@ -1,5 +1,5 @@
|
|||||||
name: yesod-auth-oauth
|
name: yesod-auth-oauth
|
||||||
version: 1.0.0
|
version: 1.1.0.0
|
||||||
license: BSD3
|
license: BSD3
|
||||||
license-file: LICENSE
|
license-file: LICENSE
|
||||||
author: Hiromi Ishii
|
author: Hiromi Ishii
|
||||||
@ -10,7 +10,7 @@ stability: Stable
|
|||||||
cabal-version: >= 1.6.0
|
cabal-version: >= 1.6.0
|
||||||
build-type: Simple
|
build-type: Simple
|
||||||
homepage: http://www.yesodweb.com/
|
homepage: http://www.yesodweb.com/
|
||||||
description: Authentication for Yesod.
|
description: Oauth Authentication for Yesod.
|
||||||
|
|
||||||
flag ghc7
|
flag ghc7
|
||||||
|
|
||||||
@ -20,12 +20,12 @@ library
|
|||||||
cpp-options: -DGHC7
|
cpp-options: -DGHC7
|
||||||
else
|
else
|
||||||
build-depends: base >= 4 && < 4.3
|
build-depends: base >= 4 && < 4.3
|
||||||
build-depends: authenticate-oauth >= 1.3 && < 1.4
|
build-depends: authenticate-oauth >= 1.4 && < 1.5
|
||||||
, bytestring >= 0.9.1.4 && < 0.10
|
, bytestring >= 0.9.1.4 && < 0.10
|
||||||
, yesod-core >= 1.0 && < 1.1
|
, yesod-core >= 1.1 && < 1.2
|
||||||
, yesod-auth >= 1.0 && < 1.1
|
, yesod-auth >= 1.1 && < 1.2
|
||||||
, text >= 0.7 && < 0.12
|
, text >= 0.7 && < 0.12
|
||||||
, yesod-form >= 1.0 && < 1.1
|
, yesod-form >= 1.1 && < 1.2
|
||||||
, transformers >= 0.2.2 && < 0.4
|
, transformers >= 0.2.2 && < 0.4
|
||||||
exposed-modules: Yesod.Auth.OAuth
|
exposed-modules: Yesod.Auth.OAuth
|
||||||
ghc-options: -Wall
|
ghc-options: -Wall
|
||||||
|
|||||||
@ -438,6 +438,12 @@ handlerToIO =
|
|||||||
newWaiReq = oldWaiReq { W.requestBody = mempty }
|
newWaiReq = oldWaiReq { W.requestBody = mempty }
|
||||||
newReq = oldReq { reqWaiRequest = newWaiReq
|
newReq = oldReq { reqWaiRequest = newWaiReq
|
||||||
, reqBodySize = 0 }
|
, reqBodySize = 0 }
|
||||||
|
clearedOldHandlerData =
|
||||||
|
oldHandlerData { handlerRequest = err "handlerRequest never here"
|
||||||
|
, handlerState = err "handlerState never here" }
|
||||||
|
where
|
||||||
|
err :: String -> a
|
||||||
|
err = error . ("handlerToIO: clearedOldHandlerData/" ++)
|
||||||
newState <- liftIO $ do
|
newState <- liftIO $ do
|
||||||
oldState <- I.readIORef (handlerState oldHandlerData)
|
oldState <- I.readIORef (handlerState oldHandlerData)
|
||||||
return $ oldState { ghsRBC = Nothing
|
return $ oldState { ghsRBC = Nothing
|
||||||
@ -450,8 +456,9 @@ handlerToIO =
|
|||||||
-- The state IORef needs to be created here, otherwise it
|
-- The state IORef needs to be created here, otherwise it
|
||||||
-- will be shared by different invocations of this function.
|
-- will be shared by different invocations of this function.
|
||||||
newStateIORef <- I.newIORef newState
|
newStateIORef <- I.newIORef newState
|
||||||
runResourceT $ f oldHandlerData { handlerRequest = newReq
|
runResourceT $ f clearedOldHandlerData
|
||||||
, handlerState = newStateIORef }
|
{ handlerRequest = newReq
|
||||||
|
, handlerState = newStateIORef }
|
||||||
|
|
||||||
|
|
||||||
-- | Function used internally by Yesod in the process of converting a
|
-- | Function used internally by Yesod in the process of converting a
|
||||||
@ -750,7 +757,7 @@ getExpires m = do
|
|||||||
--
|
--
|
||||||
-- Note: although the value used for key and path is 'Text', you should only
|
-- Note: although the value used for key and path is 'Text', you should only
|
||||||
-- use ASCII values to be HTTP compliant.
|
-- use ASCII values to be HTTP compliant.
|
||||||
deleteCookie :: Text -- ^ key
|
deleteCookie :: Text -- ^ key
|
||||||
-> Text -- ^ path
|
-> Text -- ^ path
|
||||||
-> GHandler sub master ()
|
-> GHandler sub master ()
|
||||||
deleteCookie a = addHeader . DeleteCookie (encodeUtf8 a) . encodeUtf8
|
deleteCookie a = addHeader . DeleteCookie (encodeUtf8 a) . encodeUtf8
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
name: yesod-core
|
name: yesod-core
|
||||||
version: 1.1.1
|
version: 1.1.1.1
|
||||||
license: MIT
|
license: MIT
|
||||||
license-file: LICENSE
|
license-file: LICENSE
|
||||||
author: Michael Snoyman <michael@snoyman.com>
|
author: Michael Snoyman <michael@snoyman.com>
|
||||||
|
|||||||
@ -29,10 +29,10 @@ addHandler = do
|
|||||||
c:_
|
c:_
|
||||||
| isLower c -> error "Name must start with an upper case letter"
|
| isLower c -> error "Name must start with an upper case letter"
|
||||||
| otherwise -> return ()
|
| otherwise -> return ()
|
||||||
putStr "Enter route pattern: "
|
putStr "Enter route pattern (ex: /entry/#EntryId): "
|
||||||
hFlush stdout
|
hFlush stdout
|
||||||
pattern <- getLine
|
pattern <- getLine
|
||||||
putStr "Enter space-separated list of methods: "
|
putStr "Enter space-separated list of methods (ex: GET POST): "
|
||||||
hFlush stdout
|
hFlush stdout
|
||||||
methods <- getLine
|
methods <- getLine
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user