Safe Haskell | None |
---|---|
Language | Haskell98 |
Happstack.Authenticate.Password.Core
Synopsis
- data PasswordConfig = PasswordConfig {
- _resetLink :: Text
- _domain :: Text
- _passwordAcceptable :: Text -> Maybe Text
- resetLink :: Lens' PasswordConfig Text
- passwordAcceptable :: Lens' PasswordConfig (Text -> Maybe Text)
- domain :: Lens' PasswordConfig Text
- data PasswordError
- newtype HashedPass = HashedPass {
- _unHashedPass :: ByteString
- unHashedPass :: Iso' HashedPass ByteString
- mkHashedPass :: (Functor m, MonadIO m) => Text -> m HashedPass
- verifyHashedPass :: Text -> HashedPass -> Bool
- data PasswordState = PasswordState {
- _passwords :: Map UserId HashedPass
- passwords :: Iso' PasswordState (Map UserId HashedPass)
- initialPasswordState :: PasswordState
- setPassword :: UserId -> HashedPass -> Update PasswordState ()
- deletePassword :: UserId -> Update PasswordState ()
- verifyPasswordForUserId :: UserId -> Text -> Query PasswordState Bool
- data SetPassword = SetPassword UserId HashedPass
- newtype DeletePassword = DeletePassword UserId
- data VerifyPasswordForUserId = VerifyPasswordForUserId UserId Text
- verifyPassword :: MonadIO m => AcidState AuthenticateState -> AcidState PasswordState -> Username -> Text -> m Bool
- data UserPass = UserPass {}
- user :: Lens' UserPass Username
- password :: Lens' UserPass Text
- token :: Happstack m => AcidState AuthenticateState -> AuthenticateConfig -> AcidState PasswordState -> m Response
- data NewAccountData = NewAccountData {
- _naUser :: User
- _naPassword :: Text
- _naPasswordConfirm :: Text
- naUser :: Lens' NewAccountData User
- naPasswordConfirm :: Lens' NewAccountData Text
- naPassword :: Lens' NewAccountData Text
- data ChangePasswordData = ChangePasswordData {
- _cpOldPassword :: Text
- _cpNewPassword :: Text
- _cpNewPasswordConfirm :: Text
- cpOldPassword :: Lens' ChangePasswordData Text
- cpNewPasswordConfirm :: Lens' ChangePasswordData Text
- cpNewPassword :: Lens' ChangePasswordData Text
- account :: Happstack m => AcidState AuthenticateState -> AcidState PasswordState -> AuthenticateConfig -> PasswordConfig -> Maybe (UserId, AccountURL) -> m (Either PasswordError UserId)
- data RequestResetPasswordData = RequestResetPasswordData {}
- rrpUsername :: Iso' RequestResetPasswordData Username
- passwordRequestReset :: Happstack m => AuthenticateConfig -> PasswordConfig -> AcidState AuthenticateState -> AcidState PasswordState -> m (Either PasswordError Text)
- issueResetToken :: MonadIO m => AcidState AuthenticateState -> User -> m (Either PasswordError Text)
- sendResetEmail :: MonadIO m => Maybe FilePath -> Email -> SimpleAddress -> Maybe SimpleAddress -> Text -> m ()
- data ResetPasswordData = ResetPasswordData {
- _rpPassword :: Text
- _rpPasswordConfirm :: Text
- _rpResetToken :: Text
- rpResetToken :: Lens' ResetPasswordData Text
- rpPasswordConfirm :: Lens' ResetPasswordData Text
- rpPassword :: Lens' ResetPasswordData Text
- passwordReset :: Happstack m => AcidState AuthenticateState -> AcidState PasswordState -> PasswordConfig -> m (Either PasswordError Text)
- decodeAndVerifyResetToken :: MonadIO m => AcidState AuthenticateState -> Text -> m (Maybe (User, JWT VerifiedJWT))
Documentation
data PasswordConfig Source #
Constructors
PasswordConfig | |
Fields
|
Instances
Generic PasswordConfig Source # | |
Defined in Happstack.Authenticate.Password.Core Associated Types type Rep PasswordConfig :: Type -> Type | |
type Rep PasswordConfig Source # | |
Defined in Happstack.Authenticate.Password.Core type Rep PasswordConfig = D1 ('MetaData "PasswordConfig" "Happstack.Authenticate.Password.Core" "happstack-authenticate-2.4.0.3-7EvVUpxtQhTEftazw8o2t8" 'False) (C1 ('MetaCons "PasswordConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "_resetLink") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: (S1 ('MetaSel ('Just "_domain") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "_passwordAcceptable") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Text -> Maybe Text))))) |
resetLink :: Lens' PasswordConfig Text Source #
passwordAcceptable :: Lens' PasswordConfig (Text -> Maybe Text) Source #
domain :: Lens' PasswordConfig Text Source #
data PasswordError Source #
Constructors
Instances
Eq PasswordError Source # | |
Defined in Happstack.Authenticate.Password.Core | |
Data PasswordError Source # | |
Defined in Happstack.Authenticate.Password.Core Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> PasswordError -> c PasswordError gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c PasswordError toConstr :: PasswordError -> Constr dataTypeOf :: PasswordError -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c PasswordError) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c PasswordError) gmapT :: (forall b. Data b => b -> b) -> PasswordError -> PasswordError gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> PasswordError -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> PasswordError -> r gmapQ :: (forall d. Data d => d -> u) -> PasswordError -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> PasswordError -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> PasswordError -> m PasswordError gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> PasswordError -> m PasswordError gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> PasswordError -> m PasswordError | |
Ord PasswordError Source # | |
Defined in Happstack.Authenticate.Password.Core Methods compare :: PasswordError -> PasswordError -> Ordering (<) :: PasswordError -> PasswordError -> Bool (<=) :: PasswordError -> PasswordError -> Bool (>) :: PasswordError -> PasswordError -> Bool (>=) :: PasswordError -> PasswordError -> Bool max :: PasswordError -> PasswordError -> PasswordError min :: PasswordError -> PasswordError -> PasswordError | |
Read PasswordError Source # | |
Defined in Happstack.Authenticate.Password.Core Methods readsPrec :: Int -> ReadS PasswordError readList :: ReadS [PasswordError] readPrec :: ReadPrec PasswordError readListPrec :: ReadPrec [PasswordError] | |
Show PasswordError Source # | |
Defined in Happstack.Authenticate.Password.Core Methods showsPrec :: Int -> PasswordError -> ShowS show :: PasswordError -> String showList :: [PasswordError] -> ShowS | |
Generic PasswordError Source # | |
Defined in Happstack.Authenticate.Password.Core Associated Types type Rep PasswordError :: Type -> Type | |
ToJSON PasswordError Source # | |
Defined in Happstack.Authenticate.Password.Core Methods toJSON :: PasswordError -> Value Source # toEncoding :: PasswordError -> Encoding Source # toJSONList :: [PasswordError] -> Value Source # toEncodingList :: [PasswordError] -> Encoding Source # | |
FromJSON PasswordError Source # | |
Defined in Happstack.Authenticate.Password.Core Methods parseJSON :: Value -> Parser PasswordError Source # parseJSONList :: Value -> Parser [PasswordError] Source # | |
ToJExpr PasswordError Source # | |
Defined in Happstack.Authenticate.Password.Core Methods toJExpr :: PasswordError -> JExpr Source # toJExprFromList :: [PasswordError] -> JExpr Source # | |
RenderMessage HappstackAuthenticateI18N PasswordError Source # | |
Defined in Happstack.Authenticate.Password.Core Methods renderMessage :: HappstackAuthenticateI18N -> [Lang] -> PasswordError -> Text Source # | |
type Rep PasswordError Source # | |
Defined in Happstack.Authenticate.Password.Core type Rep PasswordError = D1 ('MetaData "PasswordError" "Happstack.Authenticate.Password.Core" "happstack-authenticate-2.4.0.3-7EvVUpxtQhTEftazw8o2t8" 'False) (((C1 ('MetaCons "NotAuthenticated" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NotAuthorized" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "InvalidUsername" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "InvalidPassword" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "InvalidUsernamePassword" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "NoEmailAddress" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "MissingResetToken" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "InvalidResetToken" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "PasswordMismatch" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "UnacceptablePassword" 'PrefixI 'True) (S1 ('MetaSel ('Just "passwordErrorMessageMsg") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :+: C1 ('MetaCons "CoreError" 'PrefixI 'True) (S1 ('MetaSel ('Just "passwordErrorMessageE") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CoreError)))))) |
newtype HashedPass Source #
Constructors
HashedPass | |
Fields
|
Instances
Eq HashedPass Source # | |
Defined in Happstack.Authenticate.Password.Core | |
Data HashedPass Source # | |
Defined in Happstack.Authenticate.Password.Core Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HashedPass -> c HashedPass gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c HashedPass toConstr :: HashedPass -> Constr dataTypeOf :: HashedPass -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c HashedPass) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c HashedPass) gmapT :: (forall b. Data b => b -> b) -> HashedPass -> HashedPass gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HashedPass -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HashedPass -> r gmapQ :: (forall d. Data d => d -> u) -> HashedPass -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> HashedPass -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> HashedPass -> m HashedPass gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HashedPass -> m HashedPass gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HashedPass -> m HashedPass | |
Ord HashedPass Source # | |
Defined in Happstack.Authenticate.Password.Core Methods compare :: HashedPass -> HashedPass -> Ordering (<) :: HashedPass -> HashedPass -> Bool (<=) :: HashedPass -> HashedPass -> Bool (>) :: HashedPass -> HashedPass -> Bool (>=) :: HashedPass -> HashedPass -> Bool max :: HashedPass -> HashedPass -> HashedPass min :: HashedPass -> HashedPass -> HashedPass | |
Read HashedPass Source # | |
Defined in Happstack.Authenticate.Password.Core Methods readsPrec :: Int -> ReadS HashedPass readList :: ReadS [HashedPass] readPrec :: ReadPrec HashedPass readListPrec :: ReadPrec [HashedPass] | |
Show HashedPass Source # | |
Defined in Happstack.Authenticate.Password.Core Methods showsPrec :: Int -> HashedPass -> ShowS show :: HashedPass -> String showList :: [HashedPass] -> ShowS | |
Generic HashedPass Source # | |
Defined in Happstack.Authenticate.Password.Core Associated Types type Rep HashedPass :: Type -> Type | |
SafeCopy HashedPass Source # | |
Defined in Happstack.Authenticate.Password.Core Methods version :: Version HashedPass Source # kind :: Kind HashedPass Source # getCopy :: Contained (Get HashedPass) Source # putCopy :: HashedPass -> Contained Put Source # internalConsistency :: Consistency HashedPass Source # objectProfile :: Profile HashedPass Source # errorTypeName :: Proxy HashedPass -> String Source # | |
type Rep HashedPass Source # | |
Defined in Happstack.Authenticate.Password.Core type Rep HashedPass = D1 ('MetaData "HashedPass" "Happstack.Authenticate.Password.Core" "happstack-authenticate-2.4.0.3-7EvVUpxtQhTEftazw8o2t8" 'True) (C1 ('MetaCons "HashedPass" 'PrefixI 'True) (S1 ('MetaSel ('Just "_unHashedPass") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString))) |
unHashedPass :: Iso' HashedPass ByteString Source #
Arguments
:: (Functor m, MonadIO m) | |
=> Text | password in plain text |
-> m HashedPass | salted and hashed |
hash a password string
Arguments
:: Text | password in plain text |
-> HashedPass | hashed version of password |
-> Bool |
verify a password
data PasswordState Source #
Constructors
PasswordState | |
Fields
|
Instances
Eq PasswordState Source # | |
Defined in Happstack.Authenticate.Password.Core | |
Data PasswordState Source # | |
Defined in Happstack.Authenticate.Password.Core Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> PasswordState -> c PasswordState gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c PasswordState toConstr :: PasswordState -> Constr dataTypeOf :: PasswordState -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c PasswordState) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c PasswordState) gmapT :: (forall b. Data b => b -> b) -> PasswordState -> PasswordState gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> PasswordState -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> PasswordState -> r gmapQ :: (forall d. Data d => d -> u) -> PasswordState -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> PasswordState -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> PasswordState -> m PasswordState gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> PasswordState -> m PasswordState gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> PasswordState -> m PasswordState | |
Ord PasswordState Source # | |
Defined in Happstack.Authenticate.Password.Core Methods compare :: PasswordState -> PasswordState -> Ordering (<) :: PasswordState -> PasswordState -> Bool (<=) :: PasswordState -> PasswordState -> Bool (>) :: PasswordState -> PasswordState -> Bool (>=) :: PasswordState -> PasswordState -> Bool max :: PasswordState -> PasswordState -> PasswordState min :: PasswordState -> PasswordState -> PasswordState | |
Read PasswordState Source # | |
Defined in Happstack.Authenticate.Password.Core Methods readsPrec :: Int -> ReadS PasswordState readList :: ReadS [PasswordState] readPrec :: ReadPrec PasswordState readListPrec :: ReadPrec [PasswordState] | |
Show PasswordState Source # | |
Defined in Happstack.Authenticate.Password.Core Methods showsPrec :: Int -> PasswordState -> ShowS show :: PasswordState -> String showList :: [PasswordState] -> ShowS | |
Generic PasswordState Source # | |
Defined in Happstack.Authenticate.Password.Core Associated Types type Rep PasswordState :: Type -> Type | |
SafeCopy PasswordState Source # | |
Defined in Happstack.Authenticate.Password.Core Methods version :: Version PasswordState Source # kind :: Kind PasswordState Source # getCopy :: Contained (Get PasswordState) Source # putCopy :: PasswordState -> Contained Put Source # internalConsistency :: Consistency PasswordState Source # objectProfile :: Profile PasswordState Source # errorTypeName :: Proxy PasswordState -> String Source # | |
IsAcidic PasswordState Source # | |
Defined in Happstack.Authenticate.Password.Core Methods acidEvents :: [Event PasswordState] Source # | |
type Rep PasswordState Source # | |
Defined in Happstack.Authenticate.Password.Core type Rep PasswordState = D1 ('MetaData "PasswordState" "Happstack.Authenticate.Password.Core" "happstack-authenticate-2.4.0.3-7EvVUpxtQhTEftazw8o2t8" 'False) (C1 ('MetaCons "PasswordState" 'PrefixI 'True) (S1 ('MetaSel ('Just "_passwords") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map UserId HashedPass)))) |
passwords :: Iso' PasswordState (Map UserId HashedPass) Source #
Arguments
:: UserId | UserId |
-> HashedPass | the hashed password |
-> Update PasswordState () |
set the password for UserId
Arguments
:: UserId | UserId |
-> Update PasswordState () |
delete the password for UserId
verifyPasswordForUserId Source #
Arguments
:: UserId | UserId |
-> Text | plain-text password |
-> Query PasswordState Bool |
verify that the supplied password matches the stored hashed password for UserId
data SetPassword Source #
Constructors
SetPassword UserId HashedPass |
Instances
SafeCopy SetPassword Source # | |
Defined in Happstack.Authenticate.Password.Core Methods version :: Version SetPassword Source # kind :: Kind SetPassword Source # getCopy :: Contained (Get SetPassword) Source # putCopy :: SetPassword -> Contained Put Source # internalConsistency :: Consistency SetPassword Source # objectProfile :: Profile SetPassword Source # errorTypeName :: Proxy SetPassword -> String Source # | |
UpdateEvent SetPassword Source # | |
Defined in Happstack.Authenticate.Password.Core | |
Method SetPassword Source # | |
Defined in Happstack.Authenticate.Password.Core Methods methodTag :: SetPassword -> Tag Source # | |
type MethodState SetPassword Source # | |
Defined in Happstack.Authenticate.Password.Core | |
type MethodResult SetPassword Source # | |
Defined in Happstack.Authenticate.Password.Core |
newtype DeletePassword Source #
Constructors
DeletePassword UserId |
Instances
SafeCopy DeletePassword Source # | |
Defined in Happstack.Authenticate.Password.Core Methods version :: Version DeletePassword Source # kind :: Kind DeletePassword Source # getCopy :: Contained (Get DeletePassword) Source # putCopy :: DeletePassword -> Contained Put Source # internalConsistency :: Consistency DeletePassword Source # objectProfile :: Profile DeletePassword Source # errorTypeName :: Proxy DeletePassword -> String Source # | |
UpdateEvent DeletePassword Source # | |
Defined in Happstack.Authenticate.Password.Core | |
Method DeletePassword Source # | |
Defined in Happstack.Authenticate.Password.Core Methods methodTag :: DeletePassword -> Tag Source # | |
type MethodState DeletePassword Source # | |
Defined in Happstack.Authenticate.Password.Core | |
type MethodResult DeletePassword Source # | |
Defined in Happstack.Authenticate.Password.Core |
data VerifyPasswordForUserId Source #
Constructors
VerifyPasswordForUserId UserId Text |
Instances
SafeCopy VerifyPasswordForUserId Source # | |
Defined in Happstack.Authenticate.Password.Core Methods version :: Version VerifyPasswordForUserId Source # kind :: Kind VerifyPasswordForUserId Source # getCopy :: Contained (Get VerifyPasswordForUserId) Source # putCopy :: VerifyPasswordForUserId -> Contained Put Source # internalConsistency :: Consistency VerifyPasswordForUserId Source # objectProfile :: Profile VerifyPasswordForUserId Source # errorTypeName :: Proxy VerifyPasswordForUserId -> String Source # | |
QueryEvent VerifyPasswordForUserId Source # | |
Defined in Happstack.Authenticate.Password.Core | |
Method VerifyPasswordForUserId Source # | |
Defined in Happstack.Authenticate.Password.Core Associated Types Methods methodTag :: VerifyPasswordForUserId -> Tag Source # | |
type MethodState VerifyPasswordForUserId Source # | |
Defined in Happstack.Authenticate.Password.Core | |
type MethodResult VerifyPasswordForUserId Source # | |
Defined in Happstack.Authenticate.Password.Core |
verifyPassword :: MonadIO m => AcidState AuthenticateState -> AcidState PasswordState -> Username -> Text -> m Bool Source #
verify that the supplied username/password is valid
Instances
Eq UserPass Source # | |
Data UserPass Source # | |
Defined in Happstack.Authenticate.Password.Core Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> UserPass -> c UserPass gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c UserPass toConstr :: UserPass -> Constr dataTypeOf :: UserPass -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c UserPass) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c UserPass) gmapT :: (forall b. Data b => b -> b) -> UserPass -> UserPass gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> UserPass -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> UserPass -> r gmapQ :: (forall d. Data d => d -> u) -> UserPass -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> UserPass -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> UserPass -> m UserPass gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> UserPass -> m UserPass gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> UserPass -> m UserPass | |
Ord UserPass Source # | |
Defined in Happstack.Authenticate.Password.Core | |
Read UserPass Source # | |
Defined in Happstack.Authenticate.Password.Core | |
Show UserPass Source # | |
Generic UserPass Source # | |
ToJSON UserPass Source # | |
FromJSON UserPass Source # | |
ToJExpr UserPass Source # | |
type Rep UserPass Source # | |
Defined in Happstack.Authenticate.Password.Core type Rep UserPass = D1 ('MetaData "UserPass" "Happstack.Authenticate.Password.Core" "happstack-authenticate-2.4.0.3-7EvVUpxtQhTEftazw8o2t8" 'False) (C1 ('MetaCons "UserPass" 'PrefixI 'True) (S1 ('MetaSel ('Just "_user") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Username) :*: S1 ('MetaSel ('Just "_password") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text))) |
token :: Happstack m => AcidState AuthenticateState -> AuthenticateConfig -> AcidState PasswordState -> m Response Source #
data NewAccountData Source #
JSON record for new account data
Constructors
NewAccountData | |
Fields
|
Instances
Eq NewAccountData Source # | |
Defined in Happstack.Authenticate.Password.Core Methods (==) :: NewAccountData -> NewAccountData -> Bool (/=) :: NewAccountData -> NewAccountData -> Bool | |
Data NewAccountData Source # | |
Defined in Happstack.Authenticate.Password.Core Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> NewAccountData -> c NewAccountData gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c NewAccountData toConstr :: NewAccountData -> Constr dataTypeOf :: NewAccountData -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c NewAccountData) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c NewAccountData) gmapT :: (forall b. Data b => b -> b) -> NewAccountData -> NewAccountData gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> NewAccountData -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> NewAccountData -> r gmapQ :: (forall d. Data d => d -> u) -> NewAccountData -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> NewAccountData -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> NewAccountData -> m NewAccountData gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> NewAccountData -> m NewAccountData gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> NewAccountData -> m NewAccountData | |
Ord NewAccountData Source # | |
Defined in Happstack.Authenticate.Password.Core Methods compare :: NewAccountData -> NewAccountData -> Ordering (<) :: NewAccountData -> NewAccountData -> Bool (<=) :: NewAccountData -> NewAccountData -> Bool (>) :: NewAccountData -> NewAccountData -> Bool (>=) :: NewAccountData -> NewAccountData -> Bool max :: NewAccountData -> NewAccountData -> NewAccountData min :: NewAccountData -> NewAccountData -> NewAccountData | |
Read NewAccountData Source # | |
Defined in Happstack.Authenticate.Password.Core Methods readsPrec :: Int -> ReadS NewAccountData readList :: ReadS [NewAccountData] readPrec :: ReadPrec NewAccountData readListPrec :: ReadPrec [NewAccountData] | |
Show NewAccountData Source # | |
Defined in Happstack.Authenticate.Password.Core Methods showsPrec :: Int -> NewAccountData -> ShowS show :: NewAccountData -> String showList :: [NewAccountData] -> ShowS | |
Generic NewAccountData Source # | |
Defined in Happstack.Authenticate.Password.Core Associated Types type Rep NewAccountData :: Type -> Type | |
ToJSON NewAccountData Source # | |
Defined in Happstack.Authenticate.Password.Core Methods toJSON :: NewAccountData -> Value Source # toEncoding :: NewAccountData -> Encoding Source # toJSONList :: [NewAccountData] -> Value Source # toEncodingList :: [NewAccountData] -> Encoding Source # | |
FromJSON NewAccountData Source # | |
Defined in Happstack.Authenticate.Password.Core Methods parseJSON :: Value -> Parser NewAccountData Source # parseJSONList :: Value -> Parser [NewAccountData] Source # | |
type Rep NewAccountData Source # | |
Defined in Happstack.Authenticate.Password.Core type Rep NewAccountData = D1 ('MetaData "NewAccountData" "Happstack.Authenticate.Password.Core" "happstack-authenticate-2.4.0.3-7EvVUpxtQhTEftazw8o2t8" 'False) (C1 ('MetaCons "NewAccountData" 'PrefixI 'True) (S1 ('MetaSel ('Just "_naUser") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 User) :*: (S1 ('MetaSel ('Just "_naPassword") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "_naPasswordConfirm") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))) |
naPasswordConfirm :: Lens' NewAccountData Text Source #
naPassword :: Lens' NewAccountData Text Source #
data ChangePasswordData Source #
JSON record for change password data
Constructors
ChangePasswordData | |
Fields
|
Instances
cpOldPassword :: Lens' ChangePasswordData Text Source #
cpNewPassword :: Lens' ChangePasswordData Text Source #
account :: Happstack m => AcidState AuthenticateState -> AcidState PasswordState -> AuthenticateConfig -> PasswordConfig -> Maybe (UserId, AccountURL) -> m (Either PasswordError UserId) Source #
account handler
data RequestResetPasswordData Source #
JSON record for new account data
Constructors
RequestResetPasswordData | |
Fields |
Instances
passwordRequestReset :: Happstack m => AuthenticateConfig -> PasswordConfig -> AcidState AuthenticateState -> AcidState PasswordState -> m (Either PasswordError Text) Source #
request reset password
issueResetToken :: MonadIO m => AcidState AuthenticateState -> User -> m (Either PasswordError Text) Source #
issueResetToken
sendResetEmail :: MonadIO m => Maybe FilePath -> Email -> SimpleAddress -> Maybe SimpleAddress -> Text -> m () Source #
data ResetPasswordData Source #
JSON record for new account data
Constructors
ResetPasswordData | |
Fields
|
Instances
Eq ResetPasswordData Source # | |
Defined in Happstack.Authenticate.Password.Core Methods (==) :: ResetPasswordData -> ResetPasswordData -> Bool (/=) :: ResetPasswordData -> ResetPasswordData -> Bool | |
Data ResetPasswordData Source # | |
Defined in Happstack.Authenticate.Password.Core Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ResetPasswordData -> c ResetPasswordData gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ResetPasswordData toConstr :: ResetPasswordData -> Constr dataTypeOf :: ResetPasswordData -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ResetPasswordData) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ResetPasswordData) gmapT :: (forall b. Data b => b -> b) -> ResetPasswordData -> ResetPasswordData gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ResetPasswordData -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ResetPasswordData -> r gmapQ :: (forall d. Data d => d -> u) -> ResetPasswordData -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> ResetPasswordData -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> ResetPasswordData -> m ResetPasswordData gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ResetPasswordData -> m ResetPasswordData gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ResetPasswordData -> m ResetPasswordData | |
Ord ResetPasswordData Source # | |
Defined in Happstack.Authenticate.Password.Core Methods compare :: ResetPasswordData -> ResetPasswordData -> Ordering (<) :: ResetPasswordData -> ResetPasswordData -> Bool (<=) :: ResetPasswordData -> ResetPasswordData -> Bool (>) :: ResetPasswordData -> ResetPasswordData -> Bool (>=) :: ResetPasswordData -> ResetPasswordData -> Bool max :: ResetPasswordData -> ResetPasswordData -> ResetPasswordData min :: ResetPasswordData -> ResetPasswordData -> ResetPasswordData | |
Read ResetPasswordData Source # | |
Defined in Happstack.Authenticate.Password.Core Methods readsPrec :: Int -> ReadS ResetPasswordData readList :: ReadS [ResetPasswordData] readPrec :: ReadPrec ResetPasswordData readListPrec :: ReadPrec [ResetPasswordData] | |
Show ResetPasswordData Source # | |
Defined in Happstack.Authenticate.Password.Core Methods showsPrec :: Int -> ResetPasswordData -> ShowS show :: ResetPasswordData -> String showList :: [ResetPasswordData] -> ShowS | |
Generic ResetPasswordData Source # | |
Defined in Happstack.Authenticate.Password.Core Associated Types type Rep ResetPasswordData :: Type -> Type Methods from :: ResetPasswordData -> Rep ResetPasswordData x to :: Rep ResetPasswordData x -> ResetPasswordData | |
ToJSON ResetPasswordData Source # | |
Defined in Happstack.Authenticate.Password.Core Methods toJSON :: ResetPasswordData -> Value Source # toEncoding :: ResetPasswordData -> Encoding Source # toJSONList :: [ResetPasswordData] -> Value Source # toEncodingList :: [ResetPasswordData] -> Encoding Source # | |
FromJSON ResetPasswordData Source # | |
Defined in Happstack.Authenticate.Password.Core Methods parseJSON :: Value -> Parser ResetPasswordData Source # parseJSONList :: Value -> Parser [ResetPasswordData] Source # | |
type Rep ResetPasswordData Source # | |
Defined in Happstack.Authenticate.Password.Core type Rep ResetPasswordData = D1 ('MetaData "ResetPasswordData" "Happstack.Authenticate.Password.Core" "happstack-authenticate-2.4.0.3-7EvVUpxtQhTEftazw8o2t8" 'False) (C1 ('MetaCons "ResetPasswordData" 'PrefixI 'True) (S1 ('MetaSel ('Just "_rpPassword") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: (S1 ('MetaSel ('Just "_rpPasswordConfirm") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "_rpResetToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))) |
rpResetToken :: Lens' ResetPasswordData Text Source #
rpPasswordConfirm :: Lens' ResetPasswordData Text Source #
rpPassword :: Lens' ResetPasswordData Text Source #
passwordReset :: Happstack m => AcidState AuthenticateState -> AcidState PasswordState -> PasswordConfig -> m (Either PasswordError Text) Source #
decodeAndVerifyResetToken :: MonadIO m => AcidState AuthenticateState -> Text -> m (Maybe (User, JWT VerifiedJWT)) Source #