on master help sign in
Update Authentication.lhs
commitf352f3b136eb11a98b50384f905da7031e3ffceb authorRuben Moor <ruben.moor@gmail.com> dateFri 14 Oct 2016, 15:06 (10 years ago) parent3ddf225
1 file changed+3−1
doc/tutorial/Authentication.lhs+3−1
doc/tutorial/Authentication.lhs+3−1
@@ -409,13 +409,15 @@ marshal an unauthenticated request into an authenticated request. Generally,
409409this will look like:
410410
411411```haskell ignore
412+import Servant.Common.Req (Req, addHeader)
413+
412414-- | The datatype we'll use to authenticate a request. If we were wrapping
413415-- something like OAuth, this might be a Bearer token.
414416type instance AuthClientData (AuthProtect "cookie-auth") = String
415417
416418-- | A method to authenticate a request
417419authenticateReq :: String -> Req -> Req
418−authenticateReq s req = SCR.addHeader "my-bespoke-header" s req
420+authenticateReq s req = addHeader "my-bespoke-header" s req
419421```
420422
421423Now, if the client method for our protected endpoint was `getProtected`, then