Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- data VerificationCodeGen
- mkVerificationCodeGen :: EmailAddress -> VerificationCodeGen
- mk6DigitVerificationCodeGen :: EmailAddress -> VerificationCodeGen
- mkKey :: EmailAddress -> Key
- generateVerificationCode :: Member Random r => VerificationCodeGen -> Scope -> Retries -> Timeout -> Maybe UUID -> Sem r Code
Documentation
data VerificationCodeGen Source #
A contextual string that is hashed into the key to yield distinct keys in different contexts for the same email address. TODO: newtype KeyContext = KeyContext ByteString
Instances
Arbitrary VerificationCodeGen Source # | |
Defined in Wire.VerificationCodeGen | |
Generic VerificationCodeGen Source # | |
Defined in Wire.VerificationCodeGen type Rep VerificationCodeGen :: Type -> Type # from :: VerificationCodeGen -> Rep VerificationCodeGen x # to :: Rep VerificationCodeGen x -> VerificationCodeGen # | |
Show VerificationCodeGen Source # | |
Defined in Wire.VerificationCodeGen showsPrec :: Int -> VerificationCodeGen -> ShowS # show :: VerificationCodeGen -> String # showList :: [VerificationCodeGen] -> ShowS # | |
Eq VerificationCodeGen Source # | |
Defined in Wire.VerificationCodeGen (==) :: VerificationCodeGen -> VerificationCodeGen -> Bool # (/=) :: VerificationCodeGen -> VerificationCodeGen -> Bool # | |
type Rep VerificationCodeGen Source # | |
Defined in Wire.VerificationCodeGen |
mkVerificationCodeGen :: EmailAddress -> VerificationCodeGen Source #
Initialise a Code
VerificationCodeGen
erator for a given natural key.
This generates a link for emails and a 6-digit code for phone. See also:
mk6DigitVerificationCodeGen
.
mk6DigitVerificationCodeGen :: EmailAddress -> VerificationCodeGen Source #
Initialise a Code
VerificationCodeGen
erator for a given natural key.
This generates a 6-digit code, matter whether it is sent to a phone or to an
email address. See also: mkVerificationCodeGen
.
mkKey :: EmailAddress -> Key Source #
generateVerificationCode Source #
:: Member Random r | |
=> VerificationCodeGen | The |
-> Scope | The scope of the generated code. |
-> Retries | Maximum verification attempts. |
-> Timeout | Time-to-live in seconds. |
-> Maybe UUID | Associated account ID. |
-> Sem r Code |
VerificationCodeGenerate a new Code
.