-- | Description: Hasned password data type
module Polysemy.Account.Data.HashedPassword where

-- | An internally used type containing a hash produced by "Data.Password".
newtype HashedPassword =
  HashedPassword { HashedPassword -> Text
unAccountPassword :: Text }
  deriving stock (HashedPassword -> HashedPassword -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: HashedPassword -> HashedPassword -> Bool
$c/= :: HashedPassword -> HashedPassword -> Bool
== :: HashedPassword -> HashedPassword -> Bool
$c== :: HashedPassword -> HashedPassword -> Bool
Eq, Int -> HashedPassword -> ShowS
[HashedPassword] -> ShowS
HashedPassword -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [HashedPassword] -> ShowS
$cshowList :: [HashedPassword] -> ShowS
show :: HashedPassword -> String
$cshow :: HashedPassword -> String
showsPrec :: Int -> HashedPassword -> ShowS
$cshowsPrec :: Int -> HashedPassword -> ShowS
Show, forall x. Rep HashedPassword x -> HashedPassword
forall x. HashedPassword -> Rep HashedPassword x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep HashedPassword x -> HashedPassword
$cfrom :: forall x. HashedPassword -> Rep HashedPassword x
Generic)
  deriving newtype (String -> HashedPassword
forall a. (String -> a) -> IsString a
fromString :: String -> HashedPassword
$cfromString :: String -> HashedPassword
IsString, Eq HashedPassword
HashedPassword -> HashedPassword -> Bool
HashedPassword -> HashedPassword -> Ordering
HashedPassword -> HashedPassword -> HashedPassword
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: HashedPassword -> HashedPassword -> HashedPassword
$cmin :: HashedPassword -> HashedPassword -> HashedPassword
max :: HashedPassword -> HashedPassword -> HashedPassword
$cmax :: HashedPassword -> HashedPassword -> HashedPassword
>= :: HashedPassword -> HashedPassword -> Bool
$c>= :: HashedPassword -> HashedPassword -> Bool
> :: HashedPassword -> HashedPassword -> Bool
$c> :: HashedPassword -> HashedPassword -> Bool
<= :: HashedPassword -> HashedPassword -> Bool
$c<= :: HashedPassword -> HashedPassword -> Bool
< :: HashedPassword -> HashedPassword -> Bool
$c< :: HashedPassword -> HashedPassword -> Bool
compare :: HashedPassword -> HashedPassword -> Ordering
$ccompare :: HashedPassword -> HashedPassword -> Ordering
Ord)

json ''HashedPassword