Cleanup import failures and compiler warnings
This commit is contained in:
parent
272091effe
commit
ef4ab91342
2 changed files with 7 additions and 5 deletions
|
@ -34,7 +34,7 @@ import qualified Data.ByteString.Lazy as BL
|
|||
import qualified Data.Map as M
|
||||
import Data.Maybe (mapMaybe, fromMaybe)
|
||||
import Data.String (fromString)
|
||||
import Data.String.Conversions (cs, (<>), ConvertibleStrings)
|
||||
import Data.String.Conversions (ConvertibleStrings, cs, (<>))
|
||||
import Data.Text (Text)
|
||||
import qualified Data.Text as T
|
||||
import Data.Text.Encoding (decodeUtf8,
|
||||
|
@ -51,6 +51,8 @@ import Network.Wai (Application,
|
|||
lazyRequestBody,
|
||||
rawQueryString,
|
||||
remoteHost,
|
||||
Response,
|
||||
Request,
|
||||
requestHeaders,
|
||||
requestMethod,
|
||||
responseLBS, vault)
|
||||
|
@ -80,8 +82,8 @@ import Servant.Common.Text (FromText, fromText)
|
|||
import Servant.Server.Internal.Authentication (AuthData (authData),
|
||||
AuthProtected (..),
|
||||
checkAuthStrict,
|
||||
onMissingAuthData,
|
||||
onUnauthenticated)
|
||||
AuthHandlers(onMissingAuthData,
|
||||
onUnauthenticated))
|
||||
import Servant.Server.Internal.PathInfo
|
||||
import Servant.Server.Internal.Router
|
||||
import Servant.Server.Internal.RoutingApplication
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
module Servant.Server.Internal.Authentication
|
||||
( AuthProtected (..)
|
||||
, AuthData (..)
|
||||
, AuthHandlers (..)
|
||||
, AuthHandlers (AuthHandlers, onMissingAuthData, onUnauthenticated)
|
||||
, basicAuthLax
|
||||
, basicAuthStrict
|
||||
, laxProtect
|
||||
|
@ -36,7 +36,7 @@ class AuthData a where
|
|||
-- | handlers to deal with authentication failures.
|
||||
data AuthHandlers authData = AuthHandlers
|
||||
{ -- 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
|
||||
onUnauthenticated :: authData -> IO Response
|
||||
|
|
Loading…
Reference in a new issue