We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b0dbd79 + 6dd473d commit f05b394Copy full SHA for f05b394
servant/src/Servant/Utils/Links.hs
@@ -112,6 +112,7 @@ import Servant.API.Verbs ( Verb )
112
import Servant.API.Sub ( type (:>) )
113
import Servant.API.Raw ( Raw )
114
import Servant.API.TypeLevel
115
+import Servant.API.Experimental.Auth ( AuthProtect )
116
117
-- | A safe link datatype.
118
-- The only way of constructing a 'Link' is using 'safeLink', which means any
@@ -259,3 +260,8 @@ instance HasLink (Verb m s ct a) where
259
260
instance HasLink Raw where
261
type MkLink Raw = Link
262
toLink _ = id
263
+
264
+-- AuthProtext instances
265
+instance HasLink sub => HasLink (AuthProtect tag :> sub) where
266
+ type MkLink (AuthProtect tag :> sub) = MkLink sub
267
+ toLink _ = toLink (Proxy :: Proxy sub)
0 commit comments