-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Happstack Authentication Library -- -- A themeable authentication library with support for username+password -- and OpenId. @package happstack-authenticate @version 0.10.5 module Happstack.Auth.Core.AuthURL data OpenIdProvider Google :: OpenIdProvider Yahoo :: OpenIdProvider Myspace :: OpenIdProvider LiveJournal :: OpenIdProvider Generic :: OpenIdProvider data AuthMode LoginMode :: AuthMode AddIdentifierMode :: AuthMode data AuthURL A_Login :: AuthURL A_AddAuth :: AuthURL A_Logout :: AuthURL A_Local :: AuthURL A_CreateAccount :: AuthURL A_ChangePassword :: AuthURL A_OpenId :: OpenIdURL -> AuthURL A_OpenIdProvider :: AuthMode -> OpenIdProvider -> AuthURL A_Facebook :: AuthMode -> AuthURL A_FacebookRedirect :: AuthMode -> AuthURL data OpenIdURL O_OpenId :: AuthMode -> OpenIdURL O_Connect :: AuthMode -> OpenIdURL authUrlInverse :: Property instance Typeable OpenIdProvider instance Typeable AuthMode instance Typeable OpenIdURL instance Typeable AuthURL instance Eq OpenIdProvider instance Ord OpenIdProvider instance Read OpenIdProvider instance Show OpenIdProvider instance Data OpenIdProvider instance Enum OpenIdProvider instance Bounded OpenIdProvider instance Eq AuthMode instance Ord AuthMode instance Read AuthMode instance Show AuthMode instance Data AuthMode instance Eq OpenIdURL instance Ord OpenIdURL instance Read OpenIdURL instance Show OpenIdURL instance Data OpenIdURL instance Eq AuthURL instance Ord AuthURL instance Read AuthURL instance Show AuthURL instance Data AuthURL instance PathInfo AuthURL instance PathInfo OpenIdURL instance Arbitrary AuthURL instance Arbitrary OpenIdURL instance Arbitrary AuthMode instance PathInfo AuthMode instance Arbitrary OpenIdProvider instance PathInfo OpenIdProvider module Happstack.Auth.Core.Auth data UserPass UserPass :: UserName -> HashedPass -> UserPassId -> UserPass upName :: UserPass -> UserName upPassword :: UserPass -> HashedPass upId :: UserPass -> UserPassId newtype UserPassId UserPassId :: Integer -> UserPassId unUserPassId :: UserPassId -> Integer -- | NOTE: The Eq and Ord instances are 'case-insensitive'. They apply -- toCaseFold before comparing. newtype UserName UserName :: Text -> UserName unUserName :: UserName -> Text -- | errors that can occur when working with UserPass data UserPassError UsernameInUse :: UserName -> UserPassError InvalidUserPassId :: UserPassId -> UserPassError InvalidUserName :: UserName -> UserPassError InvalidPassword :: UserPassError -- | return a user-friendly error message string for an -- AddAuthError userPassErrorString :: UserPassError -> String data SetUserName SetUserName :: UserPassId -> Text -> SetUserName data AuthState AuthState :: UserPasses -> UserPassId -> AuthMaps -> AuthId -> AuthTokens -> Int -> AuthState userPasses :: AuthState -> UserPasses nextUserPassId :: AuthState -> UserPassId authMaps :: AuthState -> AuthMaps nextAuthId :: AuthState -> AuthId authTokens :: AuthState -> AuthTokens defaultSessionTimeout :: AuthState -> Int -- | a reasonable initial AuthState initialAuthState :: AuthState data AuthToken AuthToken :: String -> UTCTime -> Int -> Maybe AuthId -> AuthMethod -> AuthToken tokenString :: AuthToken -> String tokenExpires :: AuthToken -> UTCTime tokenLifetime :: AuthToken -> Int tokenAuthId :: AuthToken -> Maybe AuthId tokenAuthMethod :: AuthToken -> AuthMethod newtype AuthId AuthId :: Integer -> AuthId unAuthId :: AuthId -> Integer newtype FacebookId FacebookId :: UserId -> FacebookId unFacebookId :: FacebookId -> UserId data AuthMethod AuthIdentifier :: Identifier -> AuthMethod amIdentifier :: AuthMethod -> Identifier AuthUserPassId :: UserPassId -> AuthMethod amUserPassId :: AuthMethod -> UserPassId AuthFacebook :: FacebookId -> AuthMethod amFacebookId :: AuthMethod -> FacebookId data AuthMethod_v1 AuthIdentifier_v1 :: Identifier -> AuthMethod_v1 amIdentifier_v1 :: AuthMethod_v1 -> Identifier AuthUserPassId_v1 :: UserPassId -> AuthMethod_v1 amUserPassId_v1 :: AuthMethod_v1 -> UserPassId -- | This links an authentication method (such as on OpenId -- Identifier, a FacebookId, or UserPassId) to an -- AuthId. data AuthMap AuthMap :: AuthMethod -> AuthId -> AuthMap amMethod :: AuthMap -> AuthMethod amAuthId :: AuthMap -> AuthId newtype HashedPass HashedPass :: ByteString -> HashedPass -- | hash a password string mkHashedPass :: Text -> IO HashedPass -- | generate an new authentication token genAuthToken :: MonadIO m => Maybe AuthId -> AuthMethod -> Int -> m AuthToken data AskUserPass AskUserPass :: UserPassId -> AskUserPass data CheckUserPass CheckUserPass :: Text -> Text -> CheckUserPass data CreateUserPass CreateUserPass :: UserName -> HashedPass -> CreateUserPass data SetPassword SetPassword :: UserPassId -> HashedPass -> SetPassword data AddAuthToken AddAuthToken :: AuthToken -> AddAuthToken data AskAuthToken AskAuthToken :: String -> AskAuthToken data UpdateAuthToken UpdateAuthToken :: AuthToken -> UpdateAuthToken data DeleteAuthToken DeleteAuthToken :: String -> DeleteAuthToken data GenAuthId GenAuthId :: GenAuthId data AddAuthMethod AddAuthMethod :: AuthMethod -> AuthId -> AddAuthMethod data NewAuthMethod NewAuthMethod :: AuthMethod -> NewAuthMethod data RemoveAuthIdentifier RemoveAuthIdentifier :: Identifier -> AuthId -> RemoveAuthIdentifier data IdentifierAuthIds IdentifierAuthIds :: Identifier -> IdentifierAuthIds data FacebookAuthIds FacebookAuthIds :: FacebookId -> FacebookAuthIds data AddAuthUserPassId AddAuthUserPassId :: UserPassId -> AuthId -> AddAuthUserPassId data RemoveAuthUserPassId RemoveAuthUserPassId :: UserPassId -> AuthId -> RemoveAuthUserPassId data UserPassIdAuthIds UserPassIdAuthIds :: UserPassId -> UserPassIdAuthIds data AskAuthState AskAuthState :: AskAuthState data SetDefaultSessionTimeout SetDefaultSessionTimeout :: Int -> SetDefaultSessionTimeout data GetDefaultSessionTimeout GetDefaultSessionTimeout :: GetDefaultSessionTimeout addAuthCookie :: Happstack m => AcidState AuthState -> Maybe AuthId -> AuthMethod -> m () deleteAuthCookie :: (Happstack m, Alternative m) => AcidState AuthState -> m () getAuthId :: (Alternative m, Happstack m) => AcidState AuthState -> m (Maybe AuthId) getAuthToken :: (Alternative m, Happstack m) => AcidState AuthState -> m (Maybe AuthToken) instance Typeable AskUserPass instance Typeable CheckUserPass instance Typeable CreateUserPass instance Typeable SetUserName instance Typeable SetPassword instance Typeable AddAuthToken instance Typeable AskAuthToken instance Typeable UpdateAuthToken instance Typeable DeleteAuthToken instance Typeable PurgeExpiredTokens instance Typeable AuthTokenAuthId instance Typeable GenAuthId instance Typeable AddAuthMethod instance Typeable NewAuthMethod instance Typeable RemoveAuthIdentifier instance Typeable IdentifierAuthIds instance Typeable FacebookAuthIds instance Typeable AddAuthUserPassId instance Typeable RemoveAuthUserPassId instance Typeable UserPassIdAuthIds instance Typeable AskAuthState instance Typeable SetDefaultSessionTimeout instance Typeable GetDefaultSessionTimeout instance QueryEvent GetDefaultSessionTimeout instance Method GetDefaultSessionTimeout instance SafeCopy GetDefaultSessionTimeout instance UpdateEvent SetDefaultSessionTimeout instance Method SetDefaultSessionTimeout instance SafeCopy SetDefaultSessionTimeout instance QueryEvent AskAuthState instance Method AskAuthState instance SafeCopy AskAuthState instance QueryEvent UserPassIdAuthIds instance Method UserPassIdAuthIds instance SafeCopy UserPassIdAuthIds instance UpdateEvent RemoveAuthUserPassId instance Method RemoveAuthUserPassId instance SafeCopy RemoveAuthUserPassId instance UpdateEvent AddAuthUserPassId instance Method AddAuthUserPassId instance SafeCopy AddAuthUserPassId instance QueryEvent FacebookAuthIds instance Method FacebookAuthIds instance SafeCopy FacebookAuthIds instance QueryEvent IdentifierAuthIds instance Method IdentifierAuthIds instance SafeCopy IdentifierAuthIds instance UpdateEvent RemoveAuthIdentifier instance Method RemoveAuthIdentifier instance SafeCopy RemoveAuthIdentifier instance UpdateEvent NewAuthMethod instance Method NewAuthMethod instance SafeCopy NewAuthMethod instance UpdateEvent AddAuthMethod instance Method AddAuthMethod instance SafeCopy AddAuthMethod instance UpdateEvent GenAuthId instance Method GenAuthId instance SafeCopy GenAuthId instance QueryEvent AuthTokenAuthId instance Method AuthTokenAuthId instance SafeCopy AuthTokenAuthId instance UpdateEvent PurgeExpiredTokens instance Method PurgeExpiredTokens instance SafeCopy PurgeExpiredTokens instance UpdateEvent DeleteAuthToken instance Method DeleteAuthToken instance SafeCopy DeleteAuthToken instance UpdateEvent UpdateAuthToken instance Method UpdateAuthToken instance SafeCopy UpdateAuthToken instance QueryEvent AskAuthToken instance Method AskAuthToken instance SafeCopy AskAuthToken instance UpdateEvent AddAuthToken instance Method AddAuthToken instance SafeCopy AddAuthToken instance UpdateEvent SetPassword instance Method SetPassword instance SafeCopy SetPassword instance UpdateEvent SetUserName instance Method SetUserName instance SafeCopy SetUserName instance UpdateEvent CreateUserPass instance Method CreateUserPass instance SafeCopy CreateUserPass instance QueryEvent CheckUserPass instance Method CheckUserPass instance SafeCopy CheckUserPass instance QueryEvent AskUserPass instance Method AskUserPass instance SafeCopy AskUserPass instance IsAcidic AuthState instance SafeCopy UserPassError instance Typeable UserPassError instance Eq UserPassError instance Ord UserPassError instance Read UserPassError instance Show UserPassError instance Data UserPassError instance Migrate AuthState instance SafeCopy AuthState instance Typeable AuthState instance Data AuthState instance Eq AuthState instance Show AuthState instance SafeCopy AuthState_1 instance Typeable AuthState_1 instance Data AuthState_1 instance Eq AuthState_1 instance Show AuthState_1 instance Indexable AuthToken instance Migrate AuthToken instance SafeCopy AuthToken instance Typeable AuthToken instance Eq AuthToken instance Ord AuthToken instance Data AuthToken instance Show AuthToken instance SafeCopy AuthToken_001 instance Typeable AuthToken_001 instance Eq AuthToken_001 instance Ord AuthToken_001 instance Data AuthToken_001 instance Show AuthToken_001 instance Indexable AuthMap instance SafeCopy AuthMap instance Typeable AuthMap instance Eq AuthMap instance Ord AuthMap instance Read AuthMap instance Show AuthMap instance Data AuthMap instance Migrate AuthMethod instance SafeCopy AuthMethod instance Typeable AuthMethod instance Eq AuthMethod instance Ord AuthMethod instance Read AuthMethod instance Show AuthMethod instance Data AuthMethod instance SafeCopy AuthMethod_v1 instance Typeable AuthMethod_v1 instance Eq AuthMethod_v1 instance Ord AuthMethod_v1 instance Read AuthMethod_v1 instance Show AuthMethod_v1 instance Data AuthMethod_v1 instance Migrate FacebookId instance SafeCopy FacebookId instance Typeable FacebookId instance Eq FacebookId instance Ord FacebookId instance Read FacebookId instance Show FacebookId instance Data FacebookId instance SafeCopy Id instance Data Id instance Migrate FacebookId_002 instance SafeCopy FacebookId_002 instance Typeable FacebookId_001 instance Typeable FacebookId_002 instance Eq FacebookId_001 instance Ord FacebookId_001 instance Read FacebookId_001 instance Show FacebookId_001 instance Data FacebookId_001 instance SafeCopy FacebookId_001 instance Eq FacebookId_002 instance Ord FacebookId_002 instance Read FacebookId_002 instance Show FacebookId_002 instance Data FacebookId_002 instance SafeCopy Identifier instance Indexable UserPass instance SafeCopy UserPass instance Typeable UserPass instance Eq UserPass instance Ord UserPass instance Read UserPass instance Show UserPass instance Data UserPass instance SafeCopy UserPassId instance Typeable UserPassId instance Eq UserPassId instance Ord UserPassId instance Read UserPassId instance Show UserPassId instance Data UserPassId instance Ord UserName instance Eq UserName instance SafeCopy UserName instance Typeable UserName instance Read UserName instance Show UserName instance Data UserName instance SafeCopy HashedPass instance Typeable HashedPass instance Eq HashedPass instance Ord HashedPass instance Read HashedPass instance Show HashedPass instance Data HashedPass instance PathInfo AuthId instance SafeCopy AuthId instance Typeable AuthId instance Eq AuthId instance Ord AuthId instance Read AuthId instance Show AuthId instance Data AuthId module Happstack.Auth.Core.AuthParts openIdPage :: (Alternative m, Happstack m) => AcidState AuthState -> AuthMode -> Text -> m Response getIdentifier :: Happstack m => m Identifier identifierAddAuthIdsCookie :: Happstack m => AcidState AuthState -> Identifier -> m (Maybe AuthId) facebookAddAuthIdsCookie :: Happstack m => AcidState AuthState -> FacebookId -> m (Maybe AuthId) connect :: (Happstack m, MonadRoute m, URL m ~ OpenIdURL) => AuthMode -> Maybe Text -> Text -> m Response handleOpenId :: (Alternative m, Happstack m, MonadRoute m, URL m ~ OpenIdURL) => AcidState AuthState -> Maybe Text -> Text -> OpenIdURL -> m Response facebookPage :: (Happstack m, MonadRoute m, URL m ~ AuthURL) => Credentials -> AuthMode -> m Response facebookRedirectPage :: (Happstack m, MonadRoute m, URL m ~ AuthURL) => AcidState AuthState -> Credentials -> Text -> AuthMode -> m Response module Happstack.Auth.Core.Profile newtype UserId UserId :: Integer -> UserId unUserId :: UserId -> Integer succUserId :: UserId -> UserId data Profile Profile :: UserId -> Set AuthId -> Text -> Profile userId :: Profile -> UserId auths :: Profile -> Set AuthId nickName :: Profile -> Text type Profiles = IxSet Profile data ProfileState ProfileState :: Profiles -> Map AuthId UserId -> UserId -> ProfileState profiles :: ProfileState -> Profiles -- | map of what UserId an AuthId is currently defaulting to authUserMap :: ProfileState -> Map AuthId UserId nextUserId :: ProfileState -> UserId -- | a reasonable initial ProfileState initialProfileState :: ProfileState -- | Retrieve the entire ProfileState Warning, this is an admin level -- function? getProfileState :: Query ProfileState ProfileState genUserId :: Update ProfileState UserId authIdUserId :: AuthId -> Query ProfileState (Maybe UserId) authIdProfiles :: AuthId -> Query ProfileState (Set Profile) setAuthIdUserId :: AuthId -> UserId -> Update ProfileState () createNewProfile :: Set AuthId -> Update ProfileState UserId data AuthIdUserId AuthIdUserId :: AuthId -> AuthIdUserId data AuthIdProfiles AuthIdProfiles :: AuthId -> AuthIdProfiles data SetAuthIdUserId SetAuthIdUserId :: AuthId -> UserId -> SetAuthIdUserId data CreateNewProfile CreateNewProfile :: Set AuthId -> CreateNewProfile data GenUserId GenUserId :: GenUserId data GetProfileState GetProfileState :: GetProfileState getUserId :: (Alternative m, Happstack m) => AcidState AuthState -> AcidState ProfileState -> m (Maybe UserId) instance Typeable AuthIdUserId instance Typeable AuthIdProfiles instance Typeable SetAuthIdUserId instance Typeable CreateNewProfile instance Typeable GenUserId instance Typeable GetProfileState instance QueryEvent GetProfileState instance Method GetProfileState instance SafeCopy GetProfileState instance UpdateEvent GenUserId instance Method GenUserId instance SafeCopy GenUserId instance UpdateEvent CreateNewProfile instance Method CreateNewProfile instance SafeCopy CreateNewProfile instance UpdateEvent SetAuthIdUserId instance Method SetAuthIdUserId instance SafeCopy SetAuthIdUserId instance QueryEvent AuthIdProfiles instance Method AuthIdProfiles instance SafeCopy AuthIdProfiles instance QueryEvent AuthIdUserId instance Method AuthIdUserId instance SafeCopy AuthIdUserId instance IsAcidic ProfileState instance SafeCopy ProfileState instance Typeable ProfileState instance Eq ProfileState instance Ord ProfileState instance Read ProfileState instance Show ProfileState instance Data ProfileState instance Indexable Profile instance SafeCopy Profile instance Typeable Profile instance Eq Profile instance Ord Profile instance Read Profile instance Show Profile instance Data Profile instance PathInfo UserId instance SafeCopy UserId instance Typeable UserId instance Eq UserId instance Ord UserId instance Read UserId instance Show UserId instance Data UserId module Happstack.Auth.Core.ProfileURL data ProfileURL P_SetPersonality :: UserId -> ProfileURL P_SetAuthId :: AuthId -> ProfileURL P_PickProfile :: ProfileURL authUrlInverse :: Property instance Typeable ProfileURL instance Eq ProfileURL instance Ord ProfileURL instance Read ProfileURL instance Show ProfileURL instance Data ProfileURL instance PathInfo ProfileURL instance Arbitrary ProfileURL module Happstack.Auth.Core.AuthProfileURL data AuthProfileURL AuthURL :: AuthURL -> AuthProfileURL ProfileURL :: ProfileURL -> AuthProfileURL instance Typeable AuthProfileURL instance Eq AuthProfileURL instance Ord AuthProfileURL instance Read AuthProfileURL instance Show AuthProfileURL instance Data AuthProfileURL instance Arbitrary AuthProfileURL instance PathInfo AuthProfileURL module Happstack.Auth.Core.ProfileParts pickAuthId :: (Happstack m, Alternative m) => AcidState AuthState -> m (Either (Set AuthId) AuthId) setAuthIdPage :: (Alternative m, Happstack m) => AcidState AuthState -> AuthId -> m Bool data PickProfile Picked :: UserId -> PickProfile PickPersonality :: (Set Profile) -> PickProfile PickAuthId :: (Set AuthId) -> PickProfile pickProfile :: (Happstack m, Alternative m) => AcidState AuthState -> AcidState ProfileState -> m PickProfile -- | This modules provides templates and routing functions which can be -- used to integrate authentication into your site. -- -- In most cases, you only need to call the handleAuth and -- hanldeProfile functions. The other functions are exported in -- case you wish to create your own alternatives to handleAuth / -- handleProfile module Happstack.Auth.Blaze.Templates -- | Function which takes care of all AuthURL routes. -- -- The caller provides a page template function which will be used to -- render pages. The provided page template function takes three -- arguments: -- --
-- String -- ^ string to use in the <title> tag -- -> Html -- ^ extra headers to add to the <head> tag -- -> Html -- ^ contents to stick in the <body> tag --handleAuth :: (Happstack m, MonadRoute m, URL m ~ AuthURL) => AcidState AuthState -> (String -> Html -> Html -> m Response) -> Maybe Credentials -> Maybe Text -> Text -> AuthURL -> m Response -- | Function which takes care of all ProfileURL routes. -- -- The caller provides a page template function which will be used to -- render pages. The provided page template function takes three -- arguments: -- --
-- String -- ^ string to use in the <title> tag -- -> Html -- ^ extra headers to add to the <head> tag -- -> Html -- ^ contents to stick in the <body> tag --handleProfile :: (Happstack m, Alternative m, MonadRoute m, URL m ~ ProfileURL) => AcidState AuthState -> AcidState ProfileState -> (String -> Html -> Html -> m Response) -> Text -> ProfileURL -> m Response handleAuthProfile :: (Happstack m, MonadRoute m, URL m ~ AuthProfileURL) => AcidState AuthState -> AcidState ProfileState -> (String -> Html -> Html -> m Response) -> Maybe Credentials -> Maybe Text -> Text -> AuthProfileURL -> m Response -- | this is a simple entry point into happstack-authenticate that -- provides reasonable default behavior. A majority of the time you will -- just call this function. authProfileHandler :: Happstack m => Text -> Text -> AcidState AuthState -> AcidState ProfileState -> (String -> Html -> Html -> m Response) -> Maybe Credentials -> Maybe Text -> Text -> m Response addAuthPage :: (MonadRoute m, URL m ~ AuthURL, Happstack m) => Maybe Credentials -> m Html authPicker :: (MonadRoute m, URL m ~ ProfileURL, Happstack m) => Set AuthId -> m Html createAccountPage :: (Happstack m, MonadRoute m, URL m ~ AuthURL) => AcidState AuthState -> (String -> Html -> Html -> m Response) -> Text -> AuthURL -> m Response googlePage :: (Happstack m, MonadRoute m, URL m ~ AuthURL) => AuthURL -> AuthMode -> m Response genericOpenIdPage :: (Happstack m, MonadRoute m, URL m ~ AuthURL) => (String -> Html -> Html -> m Response) -> AuthURL -> AuthMode -> m Response yahooPage :: (Happstack m, MonadRoute m, URL m ~ AuthURL) => AuthURL -> AuthMode -> m Response liveJournalPage :: (Happstack m, MonadRoute m, URL m ~ AuthURL) => (String -> Html -> Html -> m Response) -> AuthURL -> AuthMode -> m Response liveJournalForm :: (Functor m, MonadIO m) => AuthForm m Text myspacePage :: (Happstack m, MonadRoute m, URL m ~ AuthURL) => (String -> Html -> Html -> m Response) -> AuthURL -> AuthMode -> m Response localLoginPage :: (IsString a, Monoid a1, Happstack m, MonadRoute m, ~ * (URL m) AuthURL) => AcidState (EventState UserPassIdAuthIds) -> (a -> a1 -> Html -> m Response) -> AuthURL -> Text -> m Response newAccountForm :: (Functor v, MonadIO v) => AcidState AuthState -> AuthForm v (AuthId, UserPassId) personalityPicker :: (MonadRoute m, URL m ~ ProfileURL, Happstack m) => Set Profile -> m Html providerPage :: (URL m ~ AuthURL, Happstack m, MonadRoute m) => (String -> Html -> Html -> m Response) -> OpenIdProvider -> AuthURL -> AuthMode -> m Response loginPage :: (MonadRoute m, URL m ~ AuthURL, Happstack m) => Maybe Credentials -> m Html logoutPage :: (MonadRoute m, URL m ~ AuthURL, Alternative m, Happstack m) => AcidState AuthState -> m Html changePasswordPage :: (Happstack m, MonadRoute m, URL m ~ AuthURL) => AcidState AuthState -> (String -> Html -> Html -> m Response) -> AuthURL -> m Response changePasswordForm :: (Functor v, MonadIO v) => AcidState AuthState -> UserPass -> AuthForm v Text instance ToMarkup AuthTemplateError instance ToMarkup (CommonFormError [Input]) instance FormError AuthTemplateError module Happstack.Auth newtype UserId UserId :: Integer -> UserId unUserId :: UserId -> Integer data AuthState AuthState :: UserPasses -> UserPassId -> AuthMaps -> AuthId -> AuthTokens -> Int -> AuthState userPasses :: AuthState -> UserPasses nextUserPassId :: AuthState -> UserPassId authMaps :: AuthState -> AuthMaps nextAuthId :: AuthState -> AuthId authTokens :: AuthState -> AuthTokens defaultSessionTimeout :: AuthState -> Int data ProfileState ProfileState :: Profiles -> Map AuthId UserId -> UserId -> ProfileState profiles :: ProfileState -> Profiles -- | map of what UserId an AuthId is currently defaulting to authUserMap :: ProfileState -> Map AuthId UserId nextUserId :: ProfileState -> UserId data AuthProfileURL AuthURL :: AuthURL -> AuthProfileURL ProfileURL :: ProfileURL -> AuthProfileURL data AuthURL A_Login :: AuthURL A_AddAuth :: AuthURL A_Logout :: AuthURL A_Local :: AuthURL A_CreateAccount :: AuthURL A_ChangePassword :: AuthURL A_OpenId :: OpenIdURL -> AuthURL A_OpenIdProvider :: AuthMode -> OpenIdProvider -> AuthURL A_Facebook :: AuthMode -> AuthURL A_FacebookRedirect :: AuthMode -> AuthURL data ProfileURL P_SetPersonality :: UserId -> ProfileURL P_SetAuthId :: AuthId -> ProfileURL P_PickProfile :: ProfileURL getUserId :: (Alternative m, Happstack m) => AcidState AuthState -> AcidState ProfileState -> m (Maybe UserId) -- | this is a simple entry point into happstack-authenticate that -- provides reasonable default behavior. A majority of the time you will -- just call this function. authProfileHandler :: Happstack m => Text -> Text -> AcidState AuthState -> AcidState ProfileState -> (String -> Html -> Html -> m Response) -> Maybe Credentials -> Maybe Text -> Text -> m Response -- | Function which takes care of all AuthURL routes. -- -- The caller provides a page template function which will be used to -- render pages. The provided page template function takes three -- arguments: -- --
-- String -- ^ string to use in the <title> tag -- -> Html -- ^ extra headers to add to the <head> tag -- -> Html -- ^ contents to stick in the <body> tag --handleAuth :: (Happstack m, MonadRoute m, URL m ~ AuthURL) => AcidState AuthState -> (String -> Html -> Html -> m Response) -> Maybe Credentials -> Maybe Text -> Text -> AuthURL -> m Response -- | Function which takes care of all ProfileURL routes. -- -- The caller provides a page template function which will be used to -- render pages. The provided page template function takes three -- arguments: -- --
-- String -- ^ string to use in the <title> tag -- -> Html -- ^ extra headers to add to the <head> tag -- -> Html -- ^ contents to stick in the <body> tag --handleProfile :: (Happstack m, Alternative m, MonadRoute m, URL m ~ ProfileURL) => AcidState AuthState -> AcidState ProfileState -> (String -> Html -> Html -> m Response) -> Text -> ProfileURL -> m Response handleAuthProfile :: (Happstack m, MonadRoute m, URL m ~ AuthProfileURL) => AcidState AuthState -> AcidState ProfileState -> (String -> Html -> Html -> m Response) -> Maybe Credentials -> Maybe Text -> Text -> AuthProfileURL -> m Response