-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | authenticate support for apiary web framework. -- -- example: -- https://github.com/philopon/apiary/blob/master/examples/auth.hs @package apiary-authenticate @version 0.12.0 module Web.Apiary.Authenticate.Explicit data AuthConfig AuthConfig :: ByteString -> ByteString -> Text -> [Text] -> [Text] -> [Text] -> [(Text, Provider)] -> AuthConfig authSessionName :: AuthConfig -> ByteString authSuccessPage :: AuthConfig -> ByteString authUrl :: AuthConfig -> Text authPrefix :: AuthConfig -> [Text] authReturnToPath :: AuthConfig -> [Text] authLogoutPath :: AuthConfig -> [Text] providers :: AuthConfig -> [(Text, Provider)] data Provider Provider :: Text -> Maybe Text -> [(Text, Text)] -> Provider providerUrl :: Provider -> Text realm :: Provider -> Maybe Text parameters :: Provider -> [(Text, Text)] data Auth data OpenId_ a OpenId_ :: a -> [(a, a)] -> Maybe a -> OpenId_ a opLocal :: OpenId_ a -> a params :: OpenId_ a -> [(a, a)] claimed :: OpenId_ a -> Maybe a type OpenId = OpenId_ Text withAuth :: Session -> AuthConfig -> (Auth -> IO a) -> IO a withAuthWith :: Session -> ManagerSettings -> AuthConfig -> (Auth -> IO a) -> IO a authHandler :: (Functor n, MonadIO n) => Auth -> ApiaryT c n m () authorized :: Auth -> Apiary (Snoc as OpenId) a -> Apiary as a authLogout :: Monad m => Auth -> ActionT m () authConfig :: Auth -> AuthConfig authProviders :: Auth -> [(Text, Provider)] authRoutes :: Auth -> [(Text, ByteString)] module Web.Apiary.Authenticate data AuthConfig AuthConfig :: ByteString -> ByteString -> Text -> [Text] -> [Text] -> [Text] -> [(Text, Provider)] -> AuthConfig authSessionName :: AuthConfig -> ByteString authSuccessPage :: AuthConfig -> ByteString authUrl :: AuthConfig -> Text authPrefix :: AuthConfig -> [Text] authReturnToPath :: AuthConfig -> [Text] authLogoutPath :: AuthConfig -> [Text] providers :: AuthConfig -> [(Text, Provider)] data Provider Provider :: Text -> Maybe Text -> [(Text, Text)] -> Provider providerUrl :: Provider -> Text realm :: Provider -> Maybe Text parameters :: Provider -> [(Text, Text)] data OpenId_ a OpenId_ :: a -> [(a, a)] -> Maybe a -> OpenId_ a opLocal :: OpenId_ a -> a params :: OpenId_ a -> [(a, a)] claimed :: OpenId_ a -> Maybe a type OpenId = OpenId_ Text type HasAuth = Given Auth withAuth :: HasSession => AuthConfig -> (HasAuth => IO a) -> IO a withAuthWith :: HasSession => ManagerSettings -> AuthConfig -> (HasAuth => IO a) -> IO a -- | default auth handlers. since 0.8.0.0. authHandler :: (Functor n, MonadIO n, HasAuth) => ApiaryT c n m () -- | filter which check whether logged in or not, and get id. since -- 0.7.0.0. authorized :: HasAuth => Apiary (Snoc as OpenId) a -> Apiary as a -- | delete session. since 0.7.0.0. authLogout :: (Monad m, HasAuth) => ActionT m () authConfig :: HasAuth => AuthConfig authProviders :: HasAuth => [(Text, Provider)] -- | get authenticate routes: (title, route). since 0.7.0.0. authRoutes :: HasAuth => [(Text, ByteString)]