yesod-auth-0.3.1: Authentication for Yesod.

Yesod.Helpers.Auth.Email

Synopsis

Documentation

class YesodAuth m => YesodAuthEmail m whereSource

Associated Types

type AuthEmailId m Source

Methods

showAuthEmailId :: m -> AuthEmailId m -> StringSource

readAuthEmailId :: m -> String -> Maybe (AuthEmailId m)Source

addUnverified :: Email -> VerKey -> GHandler Auth m (AuthEmailId m)Source

sendVerifyEmail :: Email -> VerKey -> VerUrl -> GHandler Auth m ()Source

getVerifyKey :: AuthEmailId m -> GHandler Auth m (Maybe VerKey)Source

setVerifyKey :: AuthEmailId m -> VerKey -> GHandler Auth m ()Source

verifyAccount :: AuthEmailId m -> GHandler Auth m (Maybe (AuthId m))Source

getPassword :: AuthId m -> GHandler Auth m (Maybe SaltedPass)Source

setPassword :: AuthId m -> SaltedPass -> GHandler Auth m ()Source

getEmailCreds :: Email -> GHandler Auth m (Maybe (EmailCreds m))Source

getEmail :: AuthEmailId m -> GHandler Auth m (Maybe Email)Source

randomKey :: m -> IO StringSource

Generate a random alphanumeric string.

data EmailCreds m Source

Data stored in a database for each e-mail address.

Constructors

EmailCreds 

saltPass :: String -> IO StringSource

Salt a password with a randomly generated salt.