From c19efbcec0abc98c1c069f61e08bc571f8579eef Mon Sep 17 00:00:00 2001 From: Arian van Putten Date: Thu, 1 Oct 2015 13:45:59 +0200 Subject: [PATCH] Export the auth stuff for jwt --- servant-server/src/Servant/Server/Internal/Authentication.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/servant-server/src/Servant/Server/Internal/Authentication.hs b/servant-server/src/Servant/Server/Internal/Authentication.hs index 36919a9f..073b086a 100644 --- a/servant-server/src/Servant/Server/Internal/Authentication.hs +++ b/servant-server/src/Servant/Server/Internal/Authentication.hs @@ -13,6 +13,8 @@ module Servant.Server.Internal.Authentication , basicAuthStrict , laxProtect , strictProtect +, jwtAuthHandlers +, jwtAuth ) where import Control.Monad (guard, (<=<)) @@ -133,5 +135,5 @@ jwtAuthHandlers = -- One can use strictProtect and laxProtect to make more complex authentication -- and authorization schemes. For an example of that, see our tutorial: @placeholder@ jwtAuth :: Secret -> subserver -> AuthProtected (JWT UnverifiedJWT) (JWT VerifiedJWT) subserver 'Strict -jwtAuth secret subserver = strictProtect (return . JWT.verify secret) jwtAuthHandlers subserver +jwtAuth secret subserver = strictProtect (return . JWT.verify secret) jwtAuthHandlers subserver