Safe Haskell | None |
---|---|
Language | Haskell98 |
Happstack.Auth.Core.Auth
- 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
Constructors
UserPass | |
Fields
|
newtype UserPassId Source
Constructors
UserPassId | |
Fields |
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
userPassErrorString :: UserPassError -> String Source
return a user-friendly error message string for an AddAuthError
Constructors
AuthState | |
Fields
|
initialAuthState :: AuthState Source
a reasonable initial AuthState
Constructors
AuthToken | |
Fields
|
newtype FacebookId Source
Constructors
FacebookId | |
Fields |
data AuthMethod Source
Constructors
AuthIdentifier | |
Fields | |
AuthUserPassId | |
Fields | |
AuthFacebook | |
Fields |
data AuthMethod_v1 Source
Constructors
AuthIdentifier_v1 | |
Fields | |
AuthUserPassId_v1 | |
Fields |
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 |
Arguments
:: 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
data CheckUserPass Source
Constructors
CheckUserPass Text Text |
data CreateUserPass Source
Constructors
CreateUserPass UserName HashedPass |
Constructors
GenAuthId |
Instances
data RemoveAuthIdentifier Source
Constructors
RemoveAuthIdentifier Identifier AuthId |
newtype IdentifierAuthIds Source
Constructors
IdentifierAuthIds Identifier |
newtype FacebookAuthIds Source
Constructors
FacebookAuthIds FacebookId |
data AddAuthUserPassId Source
Constructors
AddAuthUserPassId UserPassId AuthId |
data RemoveAuthUserPassId Source
Constructors
RemoveAuthUserPassId UserPassId AuthId |
newtype UserPassIdAuthIds Source
Constructors
UserPassIdAuthIds UserPassId |
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
getAuthToken :: (Alternative m, Happstack m) => AcidState AuthState -> m (Maybe AuthToken) Source