summaryrefslogtreecommitdiff
path: root/src/Servant/Auth/Swagger.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Servant/Auth/Swagger.hs')
-rw-r--r--src/Servant/Auth/Swagger.hs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/Servant/Auth/Swagger.hs b/src/Servant/Auth/Swagger.hs
index 927f823..80f7534 100644
--- a/src/Servant/Auth/Swagger.hs
+++ b/src/Servant/Auth/Swagger.hs
@@ -56,7 +56,7 @@ instance HasSecurity JWT where
class AllHasSecurity (x :: [*]) where
securities :: Proxy x -> [(T.Text,SecurityScheme)]
-instance (HasSecurity x, AllHasSecurity xs) => AllHasSecurity (x ': xs) where
+instance {-# OVERLAPPABLE #-} (HasSecurity x, AllHasSecurity xs) => AllHasSecurity (x ': xs) where
securities _ = (securityName px, securityScheme px) : securities pxs
where
px :: Proxy x
@@ -64,5 +64,11 @@ instance (HasSecurity x, AllHasSecurity xs) => AllHasSecurity (x ': xs) where
pxs :: Proxy xs
pxs = Proxy
+instance {-# OVERLAPPING #-} AllHasSecurity xs => AllHasSecurity (Cookie ': xs) where
+ securities _ = securities pxs
+ where
+ pxs :: Proxy xs
+ pxs = Proxy
+
instance AllHasSecurity '[] where
securities _ = []