Safe Haskell | None |
---|
- data UserPass = UserPass {
- upName :: UserName
- upPassword :: HashedPass
- upId :: UserPassId
- newtype UserPassId = UserPassId {
- unUserPassId :: Integer
- 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 {
- tokenString :: String
- tokenExpires :: UTCTime
- tokenLifetime :: Int
- tokenAuthId :: Maybe AuthId
- tokenAuthMethod :: AuthMethod
- newtype AuthId = AuthId {
- unAuthId :: Integer
- 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
UserPassId | |
|
Eq UserPassId | |
Data UserPassId | |
Ord UserPassId | |
Read UserPassId | |
Show UserPassId | |
Typeable UserPassId | |
SafeCopy UserPassId |
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
Eq UserPassError | |
Data UserPassError | |
Ord UserPassError | |
Read UserPassError | |
Show UserPassError | |
Typeable UserPassError | |
SafeCopy UserPassError |
userPassErrorString :: UserPassError -> StringSource
return a user-friendly error message string for an AddAuthError
data SetUserName Source
AuthState | |
|
initialAuthState :: AuthStateSource
a reasonable initial AuthState
AuthToken | |
|
newtype FacebookId Source
Eq FacebookId | |
Data FacebookId | |
Ord FacebookId | |
Read FacebookId | |
Show FacebookId | |
Typeable FacebookId | |
Migrate FacebookId | |
SafeCopy FacebookId |
data AuthMethod Source
Eq AuthMethod | |
Data AuthMethod | |
Ord AuthMethod | |
Read AuthMethod | |
Show AuthMethod | |
Typeable AuthMethod | |
Migrate AuthMethod | |
SafeCopy AuthMethod |
data AuthMethod_v1 Source
Eq AuthMethod_v1 | |
Data AuthMethod_v1 | |
Ord AuthMethod_v1 | |
Read AuthMethod_v1 | |
Show AuthMethod_v1 | |
Typeable AuthMethod_v1 | |
SafeCopy AuthMethod_v1 |
This links an authentication method (such as on OpenId Identifier
, a FacebookId
, or UserPassId
) to an AuthId
.
AuthMap | |
|
newtype HashedPass Source
Eq HashedPass | |
Data HashedPass | |
Ord HashedPass | |
Read HashedPass | |
Show HashedPass | |
Typeable HashedPass | |
SafeCopy HashedPass |
:: 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
newtype AskUserPass Source
data CheckUserPass Source
data CreateUserPass Source
data SetPassword Source
newtype AddAuthToken Source
newtype AskAuthToken Source
AskAuthToken String |
newtype UpdateAuthToken Source
newtype DeleteAuthToken Source
DeleteAuthToken String |
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