Skip to content

Commit

Permalink
Merge pull request #176 from obsidiansystems/ym/move-password-reset-t…
Browse files Browse the repository at this point in the history
…oken

account: move PasswordResetToken to rhyolite-account-types
  • Loading branch information
ali-abrar committed Jan 12, 2022
2 parents ec7fb78 + 7f7f4a8 commit a6f5b4b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
9 changes: 0 additions & 9 deletions account/backend/src/Rhyolite/Backend/Account.hs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ module Rhyolite.Backend.Account
, setAccountPassword
, setAccountPasswordHash
, makePasswordHash
, PasswordResetToken (..)
, passwordResetToken
, newNonce
, resetPassword
Expand Down Expand Up @@ -174,14 +173,6 @@ resetPasswordHash accountTable aid nonce pwhash = do
return $ Just aid
else fail "nonce mismatch"

newtype PasswordResetToken = PasswordResetToken
{ unPasswordResetToken :: (PrimaryKey Account Identity, UTCTime)
}
deriving (Generic)

instance ToJSON PasswordResetToken
instance FromJSON PasswordResetToken

passwordResetToken
:: MonadIO m
=> CS.Key
Expand Down
9 changes: 9 additions & 0 deletions account/types/src/Rhyolite/Account.hs
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,12 @@ deriving instance Show (PrimaryKey Account Identity)

instance ToJSON (PrimaryKey Account Identity)
instance FromJSON (PrimaryKey Account Identity)


newtype PasswordResetToken = PasswordResetToken
{ unPasswordResetToken :: (PrimaryKey Account Identity, UTCTime)
}
deriving (Generic)

instance ToJSON PasswordResetToken
instance FromJSON PasswordResetToken

0 comments on commit a6f5b4b

Please sign in to comment.