Apply stylish-haskell
This commit is contained in:
parent
8f83462134
commit
814584d7d9
@ -1,9 +1,9 @@
|
|||||||
{-# LANGUAGE QuasiQuotes #-}
|
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
|
||||||
{-# LANGUAGE FlexibleContexts #-}
|
{-# LANGUAGE FlexibleContexts #-}
|
||||||
{-# LANGUAGE TypeFamilies #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
|
{-# LANGUAGE QuasiQuotes #-}
|
||||||
{-# LANGUAGE RankNTypes #-}
|
{-# LANGUAGE RankNTypes #-}
|
||||||
{-# LANGUAGE ScopedTypeVariables #-}
|
{-# LANGUAGE ScopedTypeVariables #-}
|
||||||
|
{-# LANGUAGE TypeFamilies #-}
|
||||||
-- | Provides a dummy authentication module that simply lets a user specify
|
-- | Provides a dummy authentication module that simply lets a user specify
|
||||||
-- their identifier. This is not intended for real world use, just for
|
-- their identifier. This is not intended for real world use, just for
|
||||||
-- testing. This plugin supports form submissions via JSON (since 1.6.8).
|
-- testing. This plugin supports form submissions via JSON (since 1.6.8).
|
||||||
@ -36,12 +36,12 @@ module Yesod.Auth.Dummy
|
|||||||
( authDummy
|
( authDummy
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Yesod.Auth
|
import Data.Aeson.Types (Parser, Result (..))
|
||||||
import Yesod.Form (runInputPost, textField, ireq)
|
|
||||||
import Yesod.Core
|
|
||||||
import Data.Text (Text)
|
|
||||||
import Data.Aeson.Types (Result(..), Parser)
|
|
||||||
import qualified Data.Aeson.Types as A (parseEither, withObject)
|
import qualified Data.Aeson.Types as A (parseEither, withObject)
|
||||||
|
import Data.Text (Text)
|
||||||
|
import Yesod.Auth
|
||||||
|
import Yesod.Core
|
||||||
|
import Yesod.Form (ireq, runInputPost, textField)
|
||||||
|
|
||||||
identParser :: Value -> Parser Text
|
identParser :: Value -> Parser Text
|
||||||
identParser = A.withObject "Ident" (.: "ident")
|
identParser = A.withObject "Ident" (.: "ident")
|
||||||
|
|||||||
@ -117,18 +117,17 @@ module Yesod.Auth.Email
|
|||||||
, defaultRegisterHelper
|
, defaultRegisterHelper
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Yesod.Auth
|
|
||||||
import qualified Yesod.Auth.Message as Msg
|
|
||||||
import Yesod.Core
|
|
||||||
import Yesod.Form
|
|
||||||
import qualified Yesod.Auth.Util.PasswordStore as PS
|
|
||||||
import Control.Applicative ((<$>), (<*>))
|
import Control.Applicative ((<$>), (<*>))
|
||||||
import qualified Crypto.Hash as H
|
import qualified Crypto.Hash as H
|
||||||
import qualified Crypto.Nonce as Nonce
|
import qualified Crypto.Nonce as Nonce
|
||||||
|
import Data.Aeson.Types (Parser, Result (..), parseMaybe,
|
||||||
|
withObject, (.:?))
|
||||||
|
import Data.ByteArray (convert)
|
||||||
import Data.ByteString.Base16 as B16
|
import Data.ByteString.Base16 as B16
|
||||||
|
import Data.Maybe (isJust)
|
||||||
import Data.Text (Text)
|
import Data.Text (Text)
|
||||||
import qualified Data.Text as TS
|
|
||||||
import qualified Data.Text as T
|
import qualified Data.Text as T
|
||||||
|
import qualified Data.Text as TS
|
||||||
import Data.Text.Encoding (decodeUtf8With, encodeUtf8)
|
import Data.Text.Encoding (decodeUtf8With, encodeUtf8)
|
||||||
import qualified Data.Text.Encoding as TE
|
import qualified Data.Text.Encoding as TE
|
||||||
import Data.Text.Encoding.Error (lenientDecode)
|
import Data.Text.Encoding.Error (lenientDecode)
|
||||||
@ -136,10 +135,12 @@ import Data.Time (addUTCTime, getCurrentTime)
|
|||||||
import Safe (readMay)
|
import Safe (readMay)
|
||||||
import System.IO.Unsafe (unsafePerformIO)
|
import System.IO.Unsafe (unsafePerformIO)
|
||||||
import qualified Text.Email.Validate
|
import qualified Text.Email.Validate
|
||||||
import Data.Aeson.Types (Parser, Result(..), parseMaybe, withObject, (.:?))
|
import Yesod.Auth
|
||||||
import Data.Maybe (isJust)
|
import qualified Yesod.Auth.Message as Msg
|
||||||
import Data.ByteArray (convert)
|
import qualified Yesod.Auth.Util.PasswordStore as PS
|
||||||
import Yesod.Core.Types (TypedContent(TypedContent))
|
import Yesod.Core
|
||||||
|
import Yesod.Core.Types (TypedContent (TypedContent))
|
||||||
|
import Yesod.Form
|
||||||
|
|
||||||
loginR, registerR, forgotPasswordR, setpassR :: AuthRoute
|
loginR, registerR, forgotPasswordR, setpassR :: AuthRoute
|
||||||
loginR = PluginR "email" ["login"]
|
loginR = PluginR "email" ["login"]
|
||||||
|
|||||||
@ -53,20 +53,20 @@ module Yesod.Auth.GoogleEmail2
|
|||||||
, pid
|
, pid
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Yesod.Auth (Auth, AuthPlugin (AuthPlugin),
|
import Yesod.Auth (Auth, AuthHandler,
|
||||||
|
AuthPlugin (AuthPlugin),
|
||||||
AuthRoute, Creds (Creds),
|
AuthRoute, Creds (Creds),
|
||||||
Route (PluginR), YesodAuth,
|
Route (PluginR), YesodAuth,
|
||||||
runHttpRequest, setCredsRedirect,
|
logoutDest, runHttpRequest,
|
||||||
logoutDest, AuthHandler)
|
setCredsRedirect)
|
||||||
import qualified Yesod.Auth.Message as Msg
|
import qualified Yesod.Auth.Message as Msg
|
||||||
import Yesod.Core (HandlerSite, MonadHandler,
|
import Yesod.Core (HandlerSite, MonadHandler,
|
||||||
TypedContent, getRouteToParent,
|
TypedContent, addMessage,
|
||||||
getUrlRender, invalidArgs,
|
getRouteToParent, getUrlRender,
|
||||||
liftIO, lookupGetParam,
|
getYesod, invalidArgs, liftIO,
|
||||||
|
liftSubHandler, lookupGetParam,
|
||||||
lookupSession, notFound, redirect,
|
lookupSession, notFound, redirect,
|
||||||
setSession, whamlet, (.:),
|
setSession, toHtml, whamlet, (.:))
|
||||||
addMessage, getYesod,
|
|
||||||
toHtml, liftSubHandler)
|
|
||||||
|
|
||||||
|
|
||||||
import Blaze.ByteString.Builder (fromByteString, toByteString)
|
import Blaze.ByteString.Builder (fromByteString, toByteString)
|
||||||
|
|||||||
@ -131,10 +131,9 @@ module Yesod.Auth.Hardcoded
|
|||||||
, loginR )
|
, loginR )
|
||||||
where
|
where
|
||||||
|
|
||||||
import Yesod.Auth (AuthPlugin (..), AuthRoute,
|
import Yesod.Auth (AuthHandler, AuthPlugin (..), AuthRoute,
|
||||||
Creds (..), Route (..), YesodAuth,
|
Creds (..), Route (..), YesodAuth,
|
||||||
loginErrorMessageI, setCredsRedirect,
|
loginErrorMessageI, setCredsRedirect)
|
||||||
AuthHandler)
|
|
||||||
import qualified Yesod.Auth.Message as Msg
|
import qualified Yesod.Auth.Message as Msg
|
||||||
import Yesod.Core
|
import Yesod.Core
|
||||||
import Yesod.Form (ireq, runInputPost, textField)
|
import Yesod.Form (ireq, runInputPost, textField)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user