@@ -112,6 +112,7 @@ import Servant.API.Verbs ( Verb )
112import Servant.API.Sub ( type (:>) )
112import Servant.API.Sub ( type (:>) )
113import Servant.API.Raw ( Raw )
113import Servant.API.Raw ( Raw )
114import Servant.API.TypeLevel
114import Servant.API.TypeLevel
115+import Servant.API.Experimental.Auth ( AuthProtect )
116-- | A safe link datatype.
117-- | A safe link datatype.
117-- The only way of constructing a 'Link' is using 'safeLink', which means any
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
259instance HasLink Raw where
260instance HasLink Raw where
260 type MkLink Raw = Link
261 type MkLink Raw = Link
261 toLink _ = id
262 toLink _ = id
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)