From f352f3b136eb11a98b50384f905da7031e3ffceb Mon Sep 17 00:00:00 2001 From: Ruben Moor Date: Fri, 14 Oct 2016 15:06:49 +0200 Subject: [PATCH] Update Authentication.lhs --- doc/tutorial/Authentication.lhs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/tutorial/Authentication.lhs b/doc/tutorial/Authentication.lhs index 5b1c8d19..a097464f 100644 --- a/doc/tutorial/Authentication.lhs +++ b/doc/tutorial/Authentication.lhs @@ -409,13 +409,15 @@ marshal an unauthenticated request into an authenticated request. Generally, this will look like: ```haskell ignore +import Servant.Common.Req (Req, addHeader) + -- | The datatype we'll use to authenticate a request. If we were wrapping -- something like OAuth, this might be a Bearer token. type instance AuthClientData (AuthProtect "cookie-auth") = String -- | A method to authenticate a request authenticateReq :: String -> Req -> Req -authenticateReq s req = SCR.addHeader "my-bespoke-header" s req +authenticateReq s req = addHeader "my-bespoke-header" s req ``` Now, if the client method for our protected endpoint was `getProtected`, then