{-# OPTIONS_HADDOCK not-home #-}
module Servant.API.Routes.Auth
( Auth
, basicAuth
, customAuth
)
where
import GHC.TypeLits (KnownSymbol)
import "this" Servant.API.Routes.Internal.Auth
import "this" Servant.API.Routes.Utils
basicAuth ::
forall realm.
(KnownSymbol realm) =>
Auth
basicAuth :: forall (realm :: Symbol). KnownSymbol realm => Auth
basicAuth = Text -> Auth
Basic (Text -> Auth) -> Text -> Auth
forall a b. (a -> b) -> a -> b
$ forall (name :: Symbol). KnownSymbol name => Text
knownSymbolT @realm
customAuth ::
forall tag.
(KnownSymbol tag) =>
Auth
customAuth :: forall (realm :: Symbol). KnownSymbol realm => Auth
customAuth = Text -> Auth
Custom (Text -> Auth) -> Text -> Auth
forall a b. (a -> b) -> a -> b
$ forall (name :: Symbol). KnownSymbol name => Text
knownSymbolT @tag