Merged Yesod.Constants into Yesod.Definitions
This commit is contained in:
parent
254018e3c3
commit
b784ef935a
@ -1,27 +0,0 @@
|
|||||||
---------------------------------------------------------
|
|
||||||
--
|
|
||||||
-- Module : Yesod.Constants
|
|
||||||
-- Copyright : Michael Snoyman
|
|
||||||
-- License : BSD3
|
|
||||||
--
|
|
||||||
-- Maintainer : Michael Snoyman <michael@snoyman.com>
|
|
||||||
-- Stability : Stable
|
|
||||||
-- Portability : portable
|
|
||||||
--
|
|
||||||
-- Constants used throughout Yesod.
|
|
||||||
--
|
|
||||||
---------------------------------------------------------
|
|
||||||
module Yesod.Constants
|
|
||||||
( authCookieName
|
|
||||||
, authDisplayName
|
|
||||||
, encryptedCookies
|
|
||||||
) where
|
|
||||||
|
|
||||||
authCookieName :: String
|
|
||||||
authCookieName = "IDENTIFIER"
|
|
||||||
|
|
||||||
authDisplayName :: String
|
|
||||||
authDisplayName = "DISPLAY_NAME"
|
|
||||||
|
|
||||||
encryptedCookies :: [String]
|
|
||||||
encryptedCookies = [authDisplayName, authCookieName]
|
|
||||||
@ -21,6 +21,10 @@ module Yesod.Definitions
|
|||||||
, Language
|
, Language
|
||||||
, Location (..)
|
, Location (..)
|
||||||
, showLocation
|
, showLocation
|
||||||
|
-- * Constant values
|
||||||
|
, authCookieName
|
||||||
|
, authDisplayName
|
||||||
|
, encryptedCookies
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import qualified Hack
|
import qualified Hack
|
||||||
@ -66,3 +70,12 @@ data Location = AbsLoc String | RelLoc String
|
|||||||
showLocation :: Approot -> Location -> String
|
showLocation :: Approot -> Location -> String
|
||||||
showLocation _ (AbsLoc s) = s
|
showLocation _ (AbsLoc s) = s
|
||||||
showLocation ar (RelLoc s) = ar ++ s
|
showLocation ar (RelLoc s) = ar ++ s
|
||||||
|
|
||||||
|
authCookieName :: String
|
||||||
|
authCookieName = "IDENTIFIER"
|
||||||
|
|
||||||
|
authDisplayName :: String
|
||||||
|
authDisplayName = "DISPLAY_NAME"
|
||||||
|
|
||||||
|
encryptedCookies :: [String]
|
||||||
|
encryptedCookies = [authDisplayName, authCookieName]
|
||||||
|
|||||||
@ -27,7 +27,6 @@ import qualified Web.Authenticate.Rpxnow as Rpxnow
|
|||||||
import qualified Web.Authenticate.OpenId as OpenId
|
import qualified Web.Authenticate.OpenId as OpenId
|
||||||
|
|
||||||
import Yesod
|
import Yesod
|
||||||
import Yesod.Constants
|
|
||||||
|
|
||||||
import Control.Monad.Attempt
|
import Control.Monad.Attempt
|
||||||
|
|
||||||
|
|||||||
@ -10,7 +10,6 @@ import Yesod.Rep
|
|||||||
import Data.Object.Html (toHtmlObject)
|
import Data.Object.Html (toHtmlObject)
|
||||||
import Yesod.Response
|
import Yesod.Response
|
||||||
import Yesod.Request
|
import Yesod.Request
|
||||||
import Yesod.Constants
|
|
||||||
import Yesod.Definitions
|
import Yesod.Definitions
|
||||||
import Yesod.Handler
|
import Yesod.Handler
|
||||||
import Yesod.Template (TemplateGroup)
|
import Yesod.Template (TemplateGroup)
|
||||||
|
|||||||
@ -55,7 +55,6 @@ library
|
|||||||
failure >= 0.0.0 && < 0.1,
|
failure >= 0.0.0 && < 0.1,
|
||||||
safe-failure >= 0.4.0 && < 0.5
|
safe-failure >= 0.4.0 && < 0.5
|
||||||
exposed-modules: Yesod
|
exposed-modules: Yesod
|
||||||
Yesod.Constants
|
|
||||||
Yesod.Rep
|
Yesod.Rep
|
||||||
Yesod.Request
|
Yesod.Request
|
||||||
Yesod.Response
|
Yesod.Response
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user