yesod-auth-0.1.4: Authentication for Yesod.

Yesod.Helpers.Auth2

Synopsis

Documentation

data Auth Source

Instances

YesodAuth master => YesodSubSite Auth master 

data AuthPlugin m Source

Constructors

AuthPlugin 

Fields

apName :: String
 
apDispatch :: Method -> [Piece] -> GHandler Auth m ()
 
apLogin :: forall s. (Route Auth -> Route m) -> GWidget s m ()
 

data Creds m Source

User credentials

Constructors

Creds 

Fields

credsPlugin :: String

How the user was authenticated

credsIdent :: String

Identifier. Exact meaning depends on plugin.

credsExtra :: [(String, String)]
 

class Yesod m => YesodAuth m whereSource

Associated Types

type AuthId m Source

Methods

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.