yesod-auth-1.1.3: Authentication for Yesod.

Safe HaskellNone

Yesod.Auth.Email

Contents

Synopsis

Plugin

class (YesodAuth m, PathPiece (AuthEmailId m)) => YesodAuthEmail m whereSource

Associated Types

type AuthEmailId m Source

Methods

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 TextSource

Generate a random alphanumeric string.

data EmailCreds m Source

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

Constructors

EmailCreds 

saltPass :: Text -> IO TextSource

Salt a password with a randomly generated salt.

Routes

isValidPassSource

Arguments

:: Text

cleartext password

-> SaltedPass

salted password

-> Bool