Safe Haskell | None |
---|---|
Language | Haskell98 |
- data UserPass = UserPass {
- upName :: UserName
- upPassword :: HashedPass
- upId :: UserPassId
- newtype UserPassId = UserPassId {}
- newtype UserName = UserName {
- unUserName :: Text
- data UserPassError
- userPassErrorString :: UserPassError -> String
- data SetUserName = SetUserName UserPassId Text
- data AuthState = AuthState {
- userPasses :: UserPasses
- nextUserPassId :: UserPassId
- authMaps :: AuthMaps
- nextAuthId :: AuthId
- authTokens :: AuthTokens
- defaultSessionTimeout :: Int
- initialAuthState :: AuthState
- data AuthToken = AuthToken {}
- newtype AuthId = AuthId {}
- newtype FacebookId = FacebookId {}
- data AuthMethod
- = AuthIdentifier { }
- | AuthUserPassId { }
- | AuthFacebook { }
- data AuthMethod_v1
- = AuthIdentifier_v1 { }
- | AuthUserPassId_v1 { }
- data AuthMap = AuthMap {
- amMethod :: AuthMethod
- amAuthId :: AuthId
- newtype HashedPass = HashedPass ByteString
- mkHashedPass :: Text -> IO HashedPass
- genAuthToken :: MonadIO m => Maybe AuthId -> AuthMethod -> Int -> m AuthToken
- newtype AskUserPass = AskUserPass UserPassId
- data CheckUserPass = CheckUserPass Text Text
- data CreateUserPass = CreateUserPass UserName HashedPass
- data SetPassword = SetPassword UserPassId HashedPass
- newtype AddAuthToken = AddAuthToken AuthToken
- newtype AskAuthToken = AskAuthToken String
- newtype UpdateAuthToken = UpdateAuthToken AuthToken
- newtype DeleteAuthToken = DeleteAuthToken String
- data GenAuthId = GenAuthId
- data AddAuthMethod = AddAuthMethod AuthMethod AuthId
- newtype NewAuthMethod = NewAuthMethod AuthMethod
- data RemoveAuthIdentifier = RemoveAuthIdentifier Identifier AuthId
- newtype IdentifierAuthIds = IdentifierAuthIds Identifier
- newtype FacebookAuthIds = FacebookAuthIds FacebookId
- data AddAuthUserPassId = AddAuthUserPassId UserPassId AuthId
- data RemoveAuthUserPassId = RemoveAuthUserPassId UserPassId AuthId
- newtype UserPassIdAuthIds = UserPassIdAuthIds UserPassId
- data AskAuthState = AskAuthState
- newtype SetDefaultSessionTimeout = SetDefaultSessionTimeout Int
- data 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)
Documentation
UserPass | |
|
newtype UserPassId Source
NOTE: The Eq and Ord instances are 'case-insensitive'. They apply toCaseFold
before comparing.
data UserPassError Source
errors that can occur when working with UserPass
userPassErrorString :: UserPassError -> String Source
return a user-friendly error message string for an AddAuthError
data SetUserName Source
AuthState | |
|
initialAuthState :: AuthState Source
a reasonable initial AuthState
newtype FacebookId Source
data AuthMethod_v1 Source
This links an authentication method (such as on OpenId Identifier
, a FacebookId
, or UserPassId
) to an AuthId
.
AuthMap | |
|
newtype HashedPass Source
:: Text | password in plain text |
-> IO HashedPass | salted and hashed |
hash a password string
genAuthToken :: MonadIO m => Maybe AuthId -> AuthMethod -> Int -> m AuthToken Source
generate an new authentication token
newtype AskUserPass Source
data CheckUserPass Source
data CreateUserPass Source
data SetPassword Source
newtype AddAuthToken Source
newtype AskAuthToken Source
newtype UpdateAuthToken Source
newtype DeleteAuthToken Source
data AddAuthMethod Source
newtype NewAuthMethod Source
newtype IdentifierAuthIds Source
newtype FacebookAuthIds Source
data AddAuthUserPassId Source
newtype UserPassIdAuthIds Source
data AskAuthState Source
newtype SetDefaultSessionTimeout Source
addAuthCookie :: Happstack m => AcidState AuthState -> Maybe AuthId -> AuthMethod -> m () Source
deleteAuthCookie :: (Happstack m, Alternative m) => AcidState AuthState -> m () Source
getAuthToken :: (Alternative m, Happstack m) => AcidState AuthState -> m (Maybe AuthToken) Source