fix compilation error: move import declaration and add cookie to dependencies
This commit is contained in:
parent
e6c492ab2c
commit
4b9d60ca8d
2 changed files with 2 additions and 1 deletions
|
@ -69,6 +69,7 @@ import Servant.Server (BasicAuthCheck (BasicAuthCheck),
|
||||||
import Servant.Server.Experimental.Auth (AuthHandler, AuthServerData,
|
import Servant.Server.Experimental.Auth (AuthHandler, AuthServerData,
|
||||||
mkAuthHandler)
|
mkAuthHandler)
|
||||||
import Servant.Server.Experimental.Auth()
|
import Servant.Server.Experimental.Auth()
|
||||||
|
import Web.Cookie (parseCookies)
|
||||||
|
|
||||||
-- | private data that needs protection
|
-- | private data that needs protection
|
||||||
newtype PrivateData = PrivateData { ssshhh :: Text }
|
newtype PrivateData = PrivateData { ssshhh :: Text }
|
||||||
|
@ -285,7 +286,6 @@ method (note: we depend upon [`cookie`](https://hackage.haskell.org/package/cook
|
||||||
`parseCookies` for this):
|
`parseCookies` for this):
|
||||||
|
|
||||||
```haskell
|
```haskell
|
||||||
import Web.Cookie (parseCookies)
|
|
||||||
|
|
||||||
--- | The auth handler wraps a function from Request -> Handler Account.
|
--- | The auth handler wraps a function from Request -> Handler Account.
|
||||||
--- We look for a token in the request headers that we expect to be in the cookie.
|
--- We look for a token in the request headers that we expect to be in the cookie.
|
||||||
|
|
|
@ -45,6 +45,7 @@ library
|
||||||
, transformers
|
, transformers
|
||||||
, markdown-unlit >= 0.4
|
, markdown-unlit >= 0.4
|
||||||
, http-client
|
, http-client
|
||||||
|
, cookie
|
||||||
default-language: Haskell2010
|
default-language: Haskell2010
|
||||||
ghc-options: -Wall -pgmL markdown-unlit
|
ghc-options: -Wall -pgmL markdown-unlit
|
||||||
build-tool-depends: markdown-unlit:markdown-unlit
|
build-tool-depends: markdown-unlit:markdown-unlit
|
||||||
|
|
Loading…
Reference in a new issue