Cleanup import failures and compiler warnings

This commit is contained in:
aaron levin 2015-08-08 11:50:40 -04:00 committed by Arian van Putten
parent 272091effe
commit ef4ab91342
2 changed files with 7 additions and 5 deletions

View file

@ -34,7 +34,7 @@ import qualified Data.ByteString.Lazy as BL
import qualified Data.Map as M import qualified Data.Map as M
import Data.Maybe (mapMaybe, fromMaybe) import Data.Maybe (mapMaybe, fromMaybe)
import Data.String (fromString) import Data.String (fromString)
import Data.String.Conversions (cs, (<>), ConvertibleStrings) import Data.String.Conversions (ConvertibleStrings, cs, (<>))
import Data.Text (Text) import Data.Text (Text)
import qualified Data.Text as T import qualified Data.Text as T
import Data.Text.Encoding (decodeUtf8, import Data.Text.Encoding (decodeUtf8,
@ -51,6 +51,8 @@ import Network.Wai (Application,
lazyRequestBody, lazyRequestBody,
rawQueryString, rawQueryString,
remoteHost, remoteHost,
Response,
Request,
requestHeaders, requestHeaders,
requestMethod, requestMethod,
responseLBS, vault) responseLBS, vault)
@ -80,8 +82,8 @@ import Servant.Common.Text (FromText, fromText)
import Servant.Server.Internal.Authentication (AuthData (authData), import Servant.Server.Internal.Authentication (AuthData (authData),
AuthProtected (..), AuthProtected (..),
checkAuthStrict, checkAuthStrict,
onMissingAuthData, AuthHandlers(onMissingAuthData,
onUnauthenticated) onUnauthenticated))
import Servant.Server.Internal.PathInfo import Servant.Server.Internal.PathInfo
import Servant.Server.Internal.Router import Servant.Server.Internal.Router
import Servant.Server.Internal.RoutingApplication import Servant.Server.Internal.RoutingApplication

View file

@ -6,7 +6,7 @@
module Servant.Server.Internal.Authentication module Servant.Server.Internal.Authentication
( AuthProtected (..) ( AuthProtected (..)
, AuthData (..) , AuthData (..)
, AuthHandlers (..) , AuthHandlers (AuthHandlers, onMissingAuthData, onUnauthenticated)
, basicAuthLax , basicAuthLax
, basicAuthStrict , basicAuthStrict
, laxProtect , laxProtect
@ -36,7 +36,7 @@ class AuthData a where
-- | handlers to deal with authentication failures. -- | handlers to deal with authentication failures.
data AuthHandlers authData = AuthHandlers data AuthHandlers authData = AuthHandlers
{ -- we couldn't find the right type of auth data (or any, for that matter) { -- we couldn't find the right type of auth data (or any, for that matter)
onMissingauthData :: IO Response onMissingAuthData :: IO Response
, ,
-- we found the right type of auth data in the request but the check failed -- we found the right type of auth data in the request but the check failed
onUnauthenticated :: authData -> IO Response onUnauthenticated :: authData -> IO Response