- data Auth
- data AuthPlugin m = AuthPlugin {}
- data AuthRoute
- getAuth :: a -> Auth
- data Creds m = Creds {
- credsPlugin :: String
- credsIdent :: String
- credsExtra :: [(String, String)]
- class Yesod m => YesodAuth m where
- type AuthId m
- loginDest :: m -> Route m
- logoutDest :: m -> Route m
- getAuthId :: Creds m -> GHandler s m (Maybe (AuthId m))
- showAuthId :: m -> AuthId m -> String
- readAuthId :: m -> String -> Maybe (AuthId m)
- authPlugins :: [AuthPlugin m]
- loginHandler :: GHandler Auth m RepHtml
- setCreds :: YesodAuth m => Bool -> Creds m -> GHandler s m ()
- maybeAuthId :: YesodAuth m => GHandler s m (Maybe (AuthId m))
- maybeAuth :: (YesodAuth m, Key val ~ AuthId m, PersistBackend (YesodDB m (GHandler s m)), PersistEntity val, YesodPersist m) => GHandler s m (Maybe (Key val, val))
- requireAuthId :: YesodAuth m => GHandler s m (AuthId m)
- requireAuth :: (YesodAuth m, Key val ~ AuthId m, PersistBackend (YesodDB m (GHandler s m)), PersistEntity val, YesodPersist m) => GHandler s m (Key val, val)
- authDummy :: YesodAuth m => AuthPlugin m
Documentation
YesodAuth master => YesodSubSite Auth master |
data AuthPlugin m Source
User credentials
Creds | |
|
class Yesod m => YesodAuth m whereSource
loginDest :: m -> Route mSource
Default destination on successful login, if no other destination exists.
logoutDest :: m -> Route mSource
Default destination on successful logout, if no other destination exists.
getAuthId :: Creds m -> GHandler s m (Maybe (AuthId m))Source
showAuthId :: m -> AuthId m -> StringSource
readAuthId :: m -> String -> Maybe (AuthId m)Source
authPlugins :: [AuthPlugin m]Source
loginHandler :: GHandler Auth m RepHtmlSource
What to show on the login page.
maybeAuthId :: YesodAuth m => GHandler s m (Maybe (AuthId m))Source
Retrieves user credentials, if user is authenticated.
maybeAuth :: (YesodAuth m, Key val ~ AuthId m, PersistBackend (YesodDB m (GHandler s m)), PersistEntity val, YesodPersist m) => GHandler s m (Maybe (Key val, val))Source
requireAuthId :: YesodAuth m => GHandler s m (AuthId m)Source
requireAuth :: (YesodAuth m, Key val ~ AuthId m, PersistBackend (YesodDB m (GHandler s m)), PersistEntity val, YesodPersist m) => GHandler s m (Key val, val)Source
authDummy :: YesodAuth m => AuthPlugin mSource