| Safe Haskell | None |
|---|
Happstack.Auth.Core.Auth
- 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
Constructors
| UserPass | |
Fields
| |
newtype UserPassId Source
Constructors
| UserPassId | |
Fields
| |
Instances
| 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.
Constructors
| UserName | |
Fields
| |
data UserPassError Source
errors that can occur when working with UserPass
Constructors
| UsernameInUse UserName | |
| InvalidUserPassId UserPassId | |
| InvalidUserName UserName | |
| InvalidPassword |
Instances
| 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
Constructors
| AuthState | |
Fields
| |
initialAuthState :: AuthStateSource
a reasonable initial AuthState
Constructors
| AuthToken | |
Fields
| |
newtype FacebookId Source
Constructors
| FacebookId | |
Fields | |
Instances
| Eq FacebookId | |
| Data FacebookId | |
| Ord FacebookId | |
| Read FacebookId | |
| Show FacebookId | |
| Typeable FacebookId | |
| Migrate FacebookId | |
| SafeCopy FacebookId |
data AuthMethod Source
Constructors
| AuthIdentifier | |
Fields | |
| AuthUserPassId | |
Fields | |
| AuthFacebook | |
Fields | |
Instances
| Eq AuthMethod | |
| Data AuthMethod | |
| Ord AuthMethod | |
| Read AuthMethod | |
| Show AuthMethod | |
| Typeable AuthMethod | |
| Migrate AuthMethod | |
| SafeCopy AuthMethod |
data AuthMethod_v1 Source
Constructors
| AuthIdentifier_v1 | |
Fields | |
| AuthUserPassId_v1 | |
Fields | |
Instances
| 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.
Constructors
| AuthMap | |
Fields
| |
newtype HashedPass Source
Constructors
| HashedPass ByteString |
Instances
| Eq HashedPass | |
| Data HashedPass | |
| Ord HashedPass | |
| Read HashedPass | |
| Show HashedPass | |
| Typeable HashedPass | |
| SafeCopy HashedPass |
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
Constructors
| GenAuthId |
data RemoveAuthIdentifier Source
Constructors
| RemoveAuthIdentifier Identifier AuthId |
data RemoveAuthUserPassId Source
Constructors
| RemoveAuthUserPassId UserPassId AuthId |
newtype SetDefaultSessionTimeout Source
Constructors
| SetDefaultSessionTimeout Int |
data GetDefaultSessionTimeout Source
Constructors
| GetDefaultSessionTimeout |
addAuthCookie :: Happstack m => AcidState AuthState -> Maybe AuthId -> AuthMethod -> m ()Source
deleteAuthCookie :: (Happstack m, Alternative m) => AcidState AuthState -> m ()Source