happstack-authenticate-0.10.15: Happstack Authentication Library

Safe HaskellNone

Happstack.Auth.Core.Auth

Synopsis

Documentation

data UserPass Source

Constructors

UserPass 

Instances

newtype UserPassId Source

Constructors

UserPassId 

Fields

unUserPassId :: Integer
 

Instances

newtype UserName Source

NOTE: The Eq and Ord instances are 'case-insensitive'. They apply toCaseFold before comparing.

Constructors

UserName 

Fields

unUserName :: Text
 

Instances

Eq UserName 
Data UserName 
Ord UserName 
Read UserName 
Show UserName 
Typeable UserName 
SafeCopy UserName 

userPassErrorString :: UserPassError -> StringSource

return a user-friendly error message string for an AddAuthError

data AuthState Source

Constructors

AuthState 

Fields

userPasses :: UserPasses
 
nextUserPassId :: UserPassId
 
authMaps :: AuthMaps
 
nextAuthId :: AuthId
 
authTokens :: AuthTokens
 
defaultSessionTimeout :: Int
 

data AuthToken Source

Constructors

AuthToken 

Fields

tokenString :: String
 
tokenExpires :: UTCTime
 
tokenLifetime :: Int
 
tokenAuthId :: Maybe AuthId
 
tokenAuthMethod :: AuthMethod
 

newtype AuthId Source

Constructors

AuthId 

Fields

unAuthId :: Integer
 

Instances

Eq AuthId 
Data AuthId 
Ord AuthId 
Read AuthId 
Show AuthId 
Typeable AuthId 
SafeCopy AuthId 
PathInfo AuthId 

newtype FacebookId Source

Constructors

FacebookId 

Fields

unFacebookId :: UserId
 

data AuthMap Source

This links an authentication method (such as on OpenId Identifier, a FacebookId, or UserPassId) to an AuthId.

Constructors

AuthMap 

Instances

Eq AuthMap 
Data AuthMap 
Ord AuthMap 
Read AuthMap 
Show AuthMap 
Typeable AuthMap 
Indexable AuthMap 
SafeCopy AuthMap 

newtype HashedPass Source

Constructors

HashedPass ByteString 

Instances

mkHashedPassSource

Arguments

:: Text

password in plain text

-> IO HashedPass

salted and hashed

hash a password string

genAuthToken :: MonadIO m => Maybe AuthId -> AuthMethod -> Int -> m AuthTokenSource

generate an new authentication token

deleteAuthCookie :: (Happstack m, Alternative m) => AcidState AuthState -> m ()Source

getAuthId :: (Alternative m, Happstack m) => AcidState AuthState -> m (Maybe AuthId)Source

getAuthToken :: (Alternative m, Happstack m) => AcidState AuthState -> m (Maybe AuthToken)Source