@@ -112,6 +112,7 @@ import Servant.API.Verbs ( Verb )
112112import Servant.API.Sub ( type (:>) )
113113import Servant.API.Raw ( Raw )
114114import Servant.API.TypeLevel
115+import Servant.API.Experimental.Auth ( AuthProtect )
115116
116117-- | A safe link datatype.
117118-- 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
259260instance HasLink Raw where
260261 type MkLink Raw = Link
261262 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)