{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE TypeFamilies #-}
module Crypto.WebAuthn.Model.Types
(
CredentialType (..),
AuthenticatorTransport (..),
AuthenticatorAttachment (..),
ResidentKeyRequirement (..),
UserVerificationRequirement (..),
AttestationConveyancePreference (..),
AttestationChain (..),
AttestationKind (..),
AttestationType (..),
VerifiableAttestationType (..),
RpId (..),
RelyingPartyName (..),
UserHandle (..),
generateUserHandle,
UserAccountDisplayName (..),
UserAccountName (..),
CredentialId (..),
generateCredentialId,
Challenge (..),
generateChallenge,
Timeout (..),
AssertionSignature (..),
RpIdHash (..),
ClientDataHash (..),
Origin (..),
SignatureCounter (..),
PublicKeyBytes (..),
AuthenticationExtensionsClientInputs (..),
AuthenticationExtensionsClientOutputs (..),
AuthenticatorExtensionOutputs (..),
CredentialRpEntity (..),
CredentialUserEntity (..),
CredentialParameters (..),
CredentialDescriptor (..),
AuthenticatorSelectionCriteria (..),
AuthenticatorDataFlags (..),
CollectedClientData (..),
AttestedCredentialData (..),
AuthenticatorData (..),
AttestationObject (..),
AuthenticatorResponse (..),
SomeAttestationType (..),
AttestationStatementFormat (..),
SomeAttestationStatementFormat (..),
SupportedAttestationStatementFormats,
singletonAttestationStatementFormat,
lookupAttestationStatementFormat,
RawField (..),
CredentialOptions (..),
Credential (..),
)
where
import qualified Codec.CBOR.Term as CBOR
import Control.Exception (Exception)
import Crypto.Hash (Digest)
import Crypto.Hash.Algorithms (SHA256)
import Crypto.Random (MonadRandom, getRandomBytes)
import qualified Crypto.WebAuthn.Cose.PublicKeyWithSignAlg as Cose
import qualified Crypto.WebAuthn.Cose.SignAlg as Cose
import Crypto.WebAuthn.Internal.ToJSONOrphans ()
import Crypto.WebAuthn.Model.Identifier (AAGUID)
import Crypto.WebAuthn.Model.Kinds
( AttestationKind (Unverifiable, Verifiable),
CeremonyKind (Authentication, Registration),
ProtocolKind (Fido2, FidoU2F),
)
import Data.Aeson (ToJSON, Value (Null, String), object, (.=))
import Data.Aeson.Types (toJSON)
import qualified Data.ByteString as BS
import Data.HashMap.Strict (HashMap, (!?))
import qualified Data.HashMap.Strict as HashMap
import qualified Data.Hourglass as HG
import Data.Kind (Type)
import Data.List.NonEmpty (NonEmpty)
import Data.Singletons (SingI, sing)
import Data.String (IsString)
import Data.Text (Text)
import Data.Validation (Validation)
import Data.Word (Word32)
import qualified Data.X509 as X509
import qualified Data.X509.CertificateStore as X509
import GHC.Generics (Generic)
import Type.Reflection (Typeable, eqTypeRep, typeOf, type (:~~:) (HRefl))
data RawField (raw :: Bool) where
NoRaw :: RawField 'False
WithRaw :: {RawField 'True -> ByteString
unRaw :: BS.ByteString} -> RawField 'True
deriving instance Eq (RawField raw)
deriving instance Show (RawField raw)
instance ToJSON (RawField raw) where
toJSON :: RawField raw -> Value
toJSON RawField raw
NoRaw = Value
"<none>"
toJSON (WithRaw ByteString
bytes) = ByteString -> Value
forall a. ToJSON a => a -> Value
toJSON ByteString
bytes
data CredentialType = CredentialTypePublicKey
deriving (CredentialType -> CredentialType -> Bool
(CredentialType -> CredentialType -> Bool)
-> (CredentialType -> CredentialType -> Bool) -> Eq CredentialType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CredentialType -> CredentialType -> Bool
$c/= :: CredentialType -> CredentialType -> Bool
== :: CredentialType -> CredentialType -> Bool
$c== :: CredentialType -> CredentialType -> Bool
Eq, Int -> CredentialType -> ShowS
[CredentialType] -> ShowS
CredentialType -> String
(Int -> CredentialType -> ShowS)
-> (CredentialType -> String)
-> ([CredentialType] -> ShowS)
-> Show CredentialType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CredentialType] -> ShowS
$cshowList :: [CredentialType] -> ShowS
show :: CredentialType -> String
$cshow :: CredentialType -> String
showsPrec :: Int -> CredentialType -> ShowS
$cshowsPrec :: Int -> CredentialType -> ShowS
Show, CredentialType
CredentialType -> CredentialType -> Bounded CredentialType
forall a. a -> a -> Bounded a
maxBound :: CredentialType
$cmaxBound :: CredentialType
minBound :: CredentialType
$cminBound :: CredentialType
Bounded, Int -> CredentialType
CredentialType -> Int
CredentialType -> [CredentialType]
CredentialType -> CredentialType
CredentialType -> CredentialType -> [CredentialType]
CredentialType
-> CredentialType -> CredentialType -> [CredentialType]
(CredentialType -> CredentialType)
-> (CredentialType -> CredentialType)
-> (Int -> CredentialType)
-> (CredentialType -> Int)
-> (CredentialType -> [CredentialType])
-> (CredentialType -> CredentialType -> [CredentialType])
-> (CredentialType -> CredentialType -> [CredentialType])
-> (CredentialType
-> CredentialType -> CredentialType -> [CredentialType])
-> Enum CredentialType
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
enumFromThenTo :: CredentialType
-> CredentialType -> CredentialType -> [CredentialType]
$cenumFromThenTo :: CredentialType
-> CredentialType -> CredentialType -> [CredentialType]
enumFromTo :: CredentialType -> CredentialType -> [CredentialType]
$cenumFromTo :: CredentialType -> CredentialType -> [CredentialType]
enumFromThen :: CredentialType -> CredentialType -> [CredentialType]
$cenumFromThen :: CredentialType -> CredentialType -> [CredentialType]
enumFrom :: CredentialType -> [CredentialType]
$cenumFrom :: CredentialType -> [CredentialType]
fromEnum :: CredentialType -> Int
$cfromEnum :: CredentialType -> Int
toEnum :: Int -> CredentialType
$ctoEnum :: Int -> CredentialType
pred :: CredentialType -> CredentialType
$cpred :: CredentialType -> CredentialType
succ :: CredentialType -> CredentialType
$csucc :: CredentialType -> CredentialType
Enum, Eq CredentialType
Eq CredentialType
-> (CredentialType -> CredentialType -> Ordering)
-> (CredentialType -> CredentialType -> Bool)
-> (CredentialType -> CredentialType -> Bool)
-> (CredentialType -> CredentialType -> Bool)
-> (CredentialType -> CredentialType -> Bool)
-> (CredentialType -> CredentialType -> CredentialType)
-> (CredentialType -> CredentialType -> CredentialType)
-> Ord CredentialType
CredentialType -> CredentialType -> Bool
CredentialType -> CredentialType -> Ordering
CredentialType -> CredentialType -> CredentialType
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 :: CredentialType -> CredentialType -> CredentialType
$cmin :: CredentialType -> CredentialType -> CredentialType
max :: CredentialType -> CredentialType -> CredentialType
$cmax :: CredentialType -> CredentialType -> CredentialType
>= :: CredentialType -> CredentialType -> Bool
$c>= :: CredentialType -> CredentialType -> Bool
> :: CredentialType -> CredentialType -> Bool
$c> :: CredentialType -> CredentialType -> Bool
<= :: CredentialType -> CredentialType -> Bool
$c<= :: CredentialType -> CredentialType -> Bool
< :: CredentialType -> CredentialType -> Bool
$c< :: CredentialType -> CredentialType -> Bool
compare :: CredentialType -> CredentialType -> Ordering
$ccompare :: CredentialType -> CredentialType -> Ordering
Ord, (forall x. CredentialType -> Rep CredentialType x)
-> (forall x. Rep CredentialType x -> CredentialType)
-> Generic CredentialType
forall x. Rep CredentialType x -> CredentialType
forall x. CredentialType -> Rep CredentialType x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CredentialType x -> CredentialType
$cfrom :: forall x. CredentialType -> Rep CredentialType x
Generic)
instance ToJSON CredentialType where
toJSON :: CredentialType -> Value
toJSON CredentialType
CredentialTypePublicKey = Value
"CredentialTypePublicKey"
data AuthenticatorTransport
=
AuthenticatorTransportUSB
|
AuthenticatorTransportNFC
|
AuthenticatorTransportBLE
|
AuthenticatorTransportInternal
|
AuthenticatorTransportUnknown Text
deriving (AuthenticatorTransport -> AuthenticatorTransport -> Bool
(AuthenticatorTransport -> AuthenticatorTransport -> Bool)
-> (AuthenticatorTransport -> AuthenticatorTransport -> Bool)
-> Eq AuthenticatorTransport
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AuthenticatorTransport -> AuthenticatorTransport -> Bool
$c/= :: AuthenticatorTransport -> AuthenticatorTransport -> Bool
== :: AuthenticatorTransport -> AuthenticatorTransport -> Bool
$c== :: AuthenticatorTransport -> AuthenticatorTransport -> Bool
Eq, Int -> AuthenticatorTransport -> ShowS
[AuthenticatorTransport] -> ShowS
AuthenticatorTransport -> String
(Int -> AuthenticatorTransport -> ShowS)
-> (AuthenticatorTransport -> String)
-> ([AuthenticatorTransport] -> ShowS)
-> Show AuthenticatorTransport
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AuthenticatorTransport] -> ShowS
$cshowList :: [AuthenticatorTransport] -> ShowS
show :: AuthenticatorTransport -> String
$cshow :: AuthenticatorTransport -> String
showsPrec :: Int -> AuthenticatorTransport -> ShowS
$cshowsPrec :: Int -> AuthenticatorTransport -> ShowS
Show, Eq AuthenticatorTransport
Eq AuthenticatorTransport
-> (AuthenticatorTransport -> AuthenticatorTransport -> Ordering)
-> (AuthenticatorTransport -> AuthenticatorTransport -> Bool)
-> (AuthenticatorTransport -> AuthenticatorTransport -> Bool)
-> (AuthenticatorTransport -> AuthenticatorTransport -> Bool)
-> (AuthenticatorTransport -> AuthenticatorTransport -> Bool)
-> (AuthenticatorTransport
-> AuthenticatorTransport -> AuthenticatorTransport)
-> (AuthenticatorTransport
-> AuthenticatorTransport -> AuthenticatorTransport)
-> Ord AuthenticatorTransport
AuthenticatorTransport -> AuthenticatorTransport -> Bool
AuthenticatorTransport -> AuthenticatorTransport -> Ordering
AuthenticatorTransport
-> AuthenticatorTransport -> AuthenticatorTransport
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 :: AuthenticatorTransport
-> AuthenticatorTransport -> AuthenticatorTransport
$cmin :: AuthenticatorTransport
-> AuthenticatorTransport -> AuthenticatorTransport
max :: AuthenticatorTransport
-> AuthenticatorTransport -> AuthenticatorTransport
$cmax :: AuthenticatorTransport
-> AuthenticatorTransport -> AuthenticatorTransport
>= :: AuthenticatorTransport -> AuthenticatorTransport -> Bool
$c>= :: AuthenticatorTransport -> AuthenticatorTransport -> Bool
> :: AuthenticatorTransport -> AuthenticatorTransport -> Bool
$c> :: AuthenticatorTransport -> AuthenticatorTransport -> Bool
<= :: AuthenticatorTransport -> AuthenticatorTransport -> Bool
$c<= :: AuthenticatorTransport -> AuthenticatorTransport -> Bool
< :: AuthenticatorTransport -> AuthenticatorTransport -> Bool
$c< :: AuthenticatorTransport -> AuthenticatorTransport -> Bool
compare :: AuthenticatorTransport -> AuthenticatorTransport -> Ordering
$ccompare :: AuthenticatorTransport -> AuthenticatorTransport -> Ordering
Ord, (forall x. AuthenticatorTransport -> Rep AuthenticatorTransport x)
-> (forall x.
Rep AuthenticatorTransport x -> AuthenticatorTransport)
-> Generic AuthenticatorTransport
forall x. Rep AuthenticatorTransport x -> AuthenticatorTransport
forall x. AuthenticatorTransport -> Rep AuthenticatorTransport x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AuthenticatorTransport x -> AuthenticatorTransport
$cfrom :: forall x. AuthenticatorTransport -> Rep AuthenticatorTransport x
Generic, [AuthenticatorTransport] -> Encoding
[AuthenticatorTransport] -> Value
AuthenticatorTransport -> Encoding
AuthenticatorTransport -> Value
(AuthenticatorTransport -> Value)
-> (AuthenticatorTransport -> Encoding)
-> ([AuthenticatorTransport] -> Value)
-> ([AuthenticatorTransport] -> Encoding)
-> ToJSON AuthenticatorTransport
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [AuthenticatorTransport] -> Encoding
$ctoEncodingList :: [AuthenticatorTransport] -> Encoding
toJSONList :: [AuthenticatorTransport] -> Value
$ctoJSONList :: [AuthenticatorTransport] -> Value
toEncoding :: AuthenticatorTransport -> Encoding
$ctoEncoding :: AuthenticatorTransport -> Encoding
toJSON :: AuthenticatorTransport -> Value
$ctoJSON :: AuthenticatorTransport -> Value
ToJSON)
data AuthenticatorAttachment
=
AuthenticatorAttachmentPlatform
|
AuthenticatorAttachmentCrossPlatform
deriving (AuthenticatorAttachment -> AuthenticatorAttachment -> Bool
(AuthenticatorAttachment -> AuthenticatorAttachment -> Bool)
-> (AuthenticatorAttachment -> AuthenticatorAttachment -> Bool)
-> Eq AuthenticatorAttachment
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AuthenticatorAttachment -> AuthenticatorAttachment -> Bool
$c/= :: AuthenticatorAttachment -> AuthenticatorAttachment -> Bool
== :: AuthenticatorAttachment -> AuthenticatorAttachment -> Bool
$c== :: AuthenticatorAttachment -> AuthenticatorAttachment -> Bool
Eq, Int -> AuthenticatorAttachment -> ShowS
[AuthenticatorAttachment] -> ShowS
AuthenticatorAttachment -> String
(Int -> AuthenticatorAttachment -> ShowS)
-> (AuthenticatorAttachment -> String)
-> ([AuthenticatorAttachment] -> ShowS)
-> Show AuthenticatorAttachment
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AuthenticatorAttachment] -> ShowS
$cshowList :: [AuthenticatorAttachment] -> ShowS
show :: AuthenticatorAttachment -> String
$cshow :: AuthenticatorAttachment -> String
showsPrec :: Int -> AuthenticatorAttachment -> ShowS
$cshowsPrec :: Int -> AuthenticatorAttachment -> ShowS
Show, AuthenticatorAttachment
AuthenticatorAttachment
-> AuthenticatorAttachment -> Bounded AuthenticatorAttachment
forall a. a -> a -> Bounded a
maxBound :: AuthenticatorAttachment
$cmaxBound :: AuthenticatorAttachment
minBound :: AuthenticatorAttachment
$cminBound :: AuthenticatorAttachment
Bounded, Int -> AuthenticatorAttachment
AuthenticatorAttachment -> Int
AuthenticatorAttachment -> [AuthenticatorAttachment]
AuthenticatorAttachment -> AuthenticatorAttachment
AuthenticatorAttachment
-> AuthenticatorAttachment -> [AuthenticatorAttachment]
AuthenticatorAttachment
-> AuthenticatorAttachment
-> AuthenticatorAttachment
-> [AuthenticatorAttachment]
(AuthenticatorAttachment -> AuthenticatorAttachment)
-> (AuthenticatorAttachment -> AuthenticatorAttachment)
-> (Int -> AuthenticatorAttachment)
-> (AuthenticatorAttachment -> Int)
-> (AuthenticatorAttachment -> [AuthenticatorAttachment])
-> (AuthenticatorAttachment
-> AuthenticatorAttachment -> [AuthenticatorAttachment])
-> (AuthenticatorAttachment
-> AuthenticatorAttachment -> [AuthenticatorAttachment])
-> (AuthenticatorAttachment
-> AuthenticatorAttachment
-> AuthenticatorAttachment
-> [AuthenticatorAttachment])
-> Enum AuthenticatorAttachment
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
enumFromThenTo :: AuthenticatorAttachment
-> AuthenticatorAttachment
-> AuthenticatorAttachment
-> [AuthenticatorAttachment]
$cenumFromThenTo :: AuthenticatorAttachment
-> AuthenticatorAttachment
-> AuthenticatorAttachment
-> [AuthenticatorAttachment]
enumFromTo :: AuthenticatorAttachment
-> AuthenticatorAttachment -> [AuthenticatorAttachment]
$cenumFromTo :: AuthenticatorAttachment
-> AuthenticatorAttachment -> [AuthenticatorAttachment]
enumFromThen :: AuthenticatorAttachment
-> AuthenticatorAttachment -> [AuthenticatorAttachment]
$cenumFromThen :: AuthenticatorAttachment
-> AuthenticatorAttachment -> [AuthenticatorAttachment]
enumFrom :: AuthenticatorAttachment -> [AuthenticatorAttachment]
$cenumFrom :: AuthenticatorAttachment -> [AuthenticatorAttachment]
fromEnum :: AuthenticatorAttachment -> Int
$cfromEnum :: AuthenticatorAttachment -> Int
toEnum :: Int -> AuthenticatorAttachment
$ctoEnum :: Int -> AuthenticatorAttachment
pred :: AuthenticatorAttachment -> AuthenticatorAttachment
$cpred :: AuthenticatorAttachment -> AuthenticatorAttachment
succ :: AuthenticatorAttachment -> AuthenticatorAttachment
$csucc :: AuthenticatorAttachment -> AuthenticatorAttachment
Enum, Eq AuthenticatorAttachment
Eq AuthenticatorAttachment
-> (AuthenticatorAttachment -> AuthenticatorAttachment -> Ordering)
-> (AuthenticatorAttachment -> AuthenticatorAttachment -> Bool)
-> (AuthenticatorAttachment -> AuthenticatorAttachment -> Bool)
-> (AuthenticatorAttachment -> AuthenticatorAttachment -> Bool)
-> (AuthenticatorAttachment -> AuthenticatorAttachment -> Bool)
-> (AuthenticatorAttachment
-> AuthenticatorAttachment -> AuthenticatorAttachment)
-> (AuthenticatorAttachment
-> AuthenticatorAttachment -> AuthenticatorAttachment)
-> Ord AuthenticatorAttachment
AuthenticatorAttachment -> AuthenticatorAttachment -> Bool
AuthenticatorAttachment -> AuthenticatorAttachment -> Ordering
AuthenticatorAttachment
-> AuthenticatorAttachment -> AuthenticatorAttachment
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 :: AuthenticatorAttachment
-> AuthenticatorAttachment -> AuthenticatorAttachment
$cmin :: AuthenticatorAttachment
-> AuthenticatorAttachment -> AuthenticatorAttachment
max :: AuthenticatorAttachment
-> AuthenticatorAttachment -> AuthenticatorAttachment
$cmax :: AuthenticatorAttachment
-> AuthenticatorAttachment -> AuthenticatorAttachment
>= :: AuthenticatorAttachment -> AuthenticatorAttachment -> Bool
$c>= :: AuthenticatorAttachment -> AuthenticatorAttachment -> Bool
> :: AuthenticatorAttachment -> AuthenticatorAttachment -> Bool
$c> :: AuthenticatorAttachment -> AuthenticatorAttachment -> Bool
<= :: AuthenticatorAttachment -> AuthenticatorAttachment -> Bool
$c<= :: AuthenticatorAttachment -> AuthenticatorAttachment -> Bool
< :: AuthenticatorAttachment -> AuthenticatorAttachment -> Bool
$c< :: AuthenticatorAttachment -> AuthenticatorAttachment -> Bool
compare :: AuthenticatorAttachment -> AuthenticatorAttachment -> Ordering
$ccompare :: AuthenticatorAttachment -> AuthenticatorAttachment -> Ordering
Ord, (forall x.
AuthenticatorAttachment -> Rep AuthenticatorAttachment x)
-> (forall x.
Rep AuthenticatorAttachment x -> AuthenticatorAttachment)
-> Generic AuthenticatorAttachment
forall x. Rep AuthenticatorAttachment x -> AuthenticatorAttachment
forall x. AuthenticatorAttachment -> Rep AuthenticatorAttachment x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AuthenticatorAttachment x -> AuthenticatorAttachment
$cfrom :: forall x. AuthenticatorAttachment -> Rep AuthenticatorAttachment x
Generic, [AuthenticatorAttachment] -> Encoding
[AuthenticatorAttachment] -> Value
AuthenticatorAttachment -> Encoding
AuthenticatorAttachment -> Value
(AuthenticatorAttachment -> Value)
-> (AuthenticatorAttachment -> Encoding)
-> ([AuthenticatorAttachment] -> Value)
-> ([AuthenticatorAttachment] -> Encoding)
-> ToJSON AuthenticatorAttachment
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [AuthenticatorAttachment] -> Encoding
$ctoEncodingList :: [AuthenticatorAttachment] -> Encoding
toJSONList :: [AuthenticatorAttachment] -> Value
$ctoJSONList :: [AuthenticatorAttachment] -> Value
toEncoding :: AuthenticatorAttachment -> Encoding
$ctoEncoding :: AuthenticatorAttachment -> Encoding
toJSON :: AuthenticatorAttachment -> Value
$ctoJSON :: AuthenticatorAttachment -> Value
ToJSON)
data ResidentKeyRequirement
=
ResidentKeyRequirementDiscouraged
|
ResidentKeyRequirementPreferred
|
ResidentKeyRequirementRequired
deriving (ResidentKeyRequirement -> ResidentKeyRequirement -> Bool
(ResidentKeyRequirement -> ResidentKeyRequirement -> Bool)
-> (ResidentKeyRequirement -> ResidentKeyRequirement -> Bool)
-> Eq ResidentKeyRequirement
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ResidentKeyRequirement -> ResidentKeyRequirement -> Bool
$c/= :: ResidentKeyRequirement -> ResidentKeyRequirement -> Bool
== :: ResidentKeyRequirement -> ResidentKeyRequirement -> Bool
$c== :: ResidentKeyRequirement -> ResidentKeyRequirement -> Bool
Eq, Int -> ResidentKeyRequirement -> ShowS
[ResidentKeyRequirement] -> ShowS
ResidentKeyRequirement -> String
(Int -> ResidentKeyRequirement -> ShowS)
-> (ResidentKeyRequirement -> String)
-> ([ResidentKeyRequirement] -> ShowS)
-> Show ResidentKeyRequirement
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ResidentKeyRequirement] -> ShowS
$cshowList :: [ResidentKeyRequirement] -> ShowS
show :: ResidentKeyRequirement -> String
$cshow :: ResidentKeyRequirement -> String
showsPrec :: Int -> ResidentKeyRequirement -> ShowS
$cshowsPrec :: Int -> ResidentKeyRequirement -> ShowS
Show, ResidentKeyRequirement
ResidentKeyRequirement
-> ResidentKeyRequirement -> Bounded ResidentKeyRequirement
forall a. a -> a -> Bounded a
maxBound :: ResidentKeyRequirement
$cmaxBound :: ResidentKeyRequirement
minBound :: ResidentKeyRequirement
$cminBound :: ResidentKeyRequirement
Bounded, Int -> ResidentKeyRequirement
ResidentKeyRequirement -> Int
ResidentKeyRequirement -> [ResidentKeyRequirement]
ResidentKeyRequirement -> ResidentKeyRequirement
ResidentKeyRequirement
-> ResidentKeyRequirement -> [ResidentKeyRequirement]
ResidentKeyRequirement
-> ResidentKeyRequirement
-> ResidentKeyRequirement
-> [ResidentKeyRequirement]
(ResidentKeyRequirement -> ResidentKeyRequirement)
-> (ResidentKeyRequirement -> ResidentKeyRequirement)
-> (Int -> ResidentKeyRequirement)
-> (ResidentKeyRequirement -> Int)
-> (ResidentKeyRequirement -> [ResidentKeyRequirement])
-> (ResidentKeyRequirement
-> ResidentKeyRequirement -> [ResidentKeyRequirement])
-> (ResidentKeyRequirement
-> ResidentKeyRequirement -> [ResidentKeyRequirement])
-> (ResidentKeyRequirement
-> ResidentKeyRequirement
-> ResidentKeyRequirement
-> [ResidentKeyRequirement])
-> Enum ResidentKeyRequirement
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
enumFromThenTo :: ResidentKeyRequirement
-> ResidentKeyRequirement
-> ResidentKeyRequirement
-> [ResidentKeyRequirement]
$cenumFromThenTo :: ResidentKeyRequirement
-> ResidentKeyRequirement
-> ResidentKeyRequirement
-> [ResidentKeyRequirement]
enumFromTo :: ResidentKeyRequirement
-> ResidentKeyRequirement -> [ResidentKeyRequirement]
$cenumFromTo :: ResidentKeyRequirement
-> ResidentKeyRequirement -> [ResidentKeyRequirement]
enumFromThen :: ResidentKeyRequirement
-> ResidentKeyRequirement -> [ResidentKeyRequirement]
$cenumFromThen :: ResidentKeyRequirement
-> ResidentKeyRequirement -> [ResidentKeyRequirement]
enumFrom :: ResidentKeyRequirement -> [ResidentKeyRequirement]
$cenumFrom :: ResidentKeyRequirement -> [ResidentKeyRequirement]
fromEnum :: ResidentKeyRequirement -> Int
$cfromEnum :: ResidentKeyRequirement -> Int
toEnum :: Int -> ResidentKeyRequirement
$ctoEnum :: Int -> ResidentKeyRequirement
pred :: ResidentKeyRequirement -> ResidentKeyRequirement
$cpred :: ResidentKeyRequirement -> ResidentKeyRequirement
succ :: ResidentKeyRequirement -> ResidentKeyRequirement
$csucc :: ResidentKeyRequirement -> ResidentKeyRequirement
Enum, Eq ResidentKeyRequirement
Eq ResidentKeyRequirement
-> (ResidentKeyRequirement -> ResidentKeyRequirement -> Ordering)
-> (ResidentKeyRequirement -> ResidentKeyRequirement -> Bool)
-> (ResidentKeyRequirement -> ResidentKeyRequirement -> Bool)
-> (ResidentKeyRequirement -> ResidentKeyRequirement -> Bool)
-> (ResidentKeyRequirement -> ResidentKeyRequirement -> Bool)
-> (ResidentKeyRequirement
-> ResidentKeyRequirement -> ResidentKeyRequirement)
-> (ResidentKeyRequirement
-> ResidentKeyRequirement -> ResidentKeyRequirement)
-> Ord ResidentKeyRequirement
ResidentKeyRequirement -> ResidentKeyRequirement -> Bool
ResidentKeyRequirement -> ResidentKeyRequirement -> Ordering
ResidentKeyRequirement
-> ResidentKeyRequirement -> ResidentKeyRequirement
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 :: ResidentKeyRequirement
-> ResidentKeyRequirement -> ResidentKeyRequirement
$cmin :: ResidentKeyRequirement
-> ResidentKeyRequirement -> ResidentKeyRequirement
max :: ResidentKeyRequirement
-> ResidentKeyRequirement -> ResidentKeyRequirement
$cmax :: ResidentKeyRequirement
-> ResidentKeyRequirement -> ResidentKeyRequirement
>= :: ResidentKeyRequirement -> ResidentKeyRequirement -> Bool
$c>= :: ResidentKeyRequirement -> ResidentKeyRequirement -> Bool
> :: ResidentKeyRequirement -> ResidentKeyRequirement -> Bool
$c> :: ResidentKeyRequirement -> ResidentKeyRequirement -> Bool
<= :: ResidentKeyRequirement -> ResidentKeyRequirement -> Bool
$c<= :: ResidentKeyRequirement -> ResidentKeyRequirement -> Bool
< :: ResidentKeyRequirement -> ResidentKeyRequirement -> Bool
$c< :: ResidentKeyRequirement -> ResidentKeyRequirement -> Bool
compare :: ResidentKeyRequirement -> ResidentKeyRequirement -> Ordering
$ccompare :: ResidentKeyRequirement -> ResidentKeyRequirement -> Ordering
Ord, (forall x. ResidentKeyRequirement -> Rep ResidentKeyRequirement x)
-> (forall x.
Rep ResidentKeyRequirement x -> ResidentKeyRequirement)
-> Generic ResidentKeyRequirement
forall x. Rep ResidentKeyRequirement x -> ResidentKeyRequirement
forall x. ResidentKeyRequirement -> Rep ResidentKeyRequirement x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ResidentKeyRequirement x -> ResidentKeyRequirement
$cfrom :: forall x. ResidentKeyRequirement -> Rep ResidentKeyRequirement x
Generic, [ResidentKeyRequirement] -> Encoding
[ResidentKeyRequirement] -> Value
ResidentKeyRequirement -> Encoding
ResidentKeyRequirement -> Value
(ResidentKeyRequirement -> Value)
-> (ResidentKeyRequirement -> Encoding)
-> ([ResidentKeyRequirement] -> Value)
-> ([ResidentKeyRequirement] -> Encoding)
-> ToJSON ResidentKeyRequirement
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [ResidentKeyRequirement] -> Encoding
$ctoEncodingList :: [ResidentKeyRequirement] -> Encoding
toJSONList :: [ResidentKeyRequirement] -> Value
$ctoJSONList :: [ResidentKeyRequirement] -> Value
toEncoding :: ResidentKeyRequirement -> Encoding
$ctoEncoding :: ResidentKeyRequirement -> Encoding
toJSON :: ResidentKeyRequirement -> Value
$ctoJSON :: ResidentKeyRequirement -> Value
ToJSON)
data UserVerificationRequirement
=
UserVerificationRequirementRequired
|
UserVerificationRequirementPreferred
|
UserVerificationRequirementDiscouraged
deriving (UserVerificationRequirement -> UserVerificationRequirement -> Bool
(UserVerificationRequirement
-> UserVerificationRequirement -> Bool)
-> (UserVerificationRequirement
-> UserVerificationRequirement -> Bool)
-> Eq UserVerificationRequirement
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UserVerificationRequirement -> UserVerificationRequirement -> Bool
$c/= :: UserVerificationRequirement -> UserVerificationRequirement -> Bool
== :: UserVerificationRequirement -> UserVerificationRequirement -> Bool
$c== :: UserVerificationRequirement -> UserVerificationRequirement -> Bool
Eq, Int -> UserVerificationRequirement -> ShowS
[UserVerificationRequirement] -> ShowS
UserVerificationRequirement -> String
(Int -> UserVerificationRequirement -> ShowS)
-> (UserVerificationRequirement -> String)
-> ([UserVerificationRequirement] -> ShowS)
-> Show UserVerificationRequirement
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UserVerificationRequirement] -> ShowS
$cshowList :: [UserVerificationRequirement] -> ShowS
show :: UserVerificationRequirement -> String
$cshow :: UserVerificationRequirement -> String
showsPrec :: Int -> UserVerificationRequirement -> ShowS
$cshowsPrec :: Int -> UserVerificationRequirement -> ShowS
Show, UserVerificationRequirement
UserVerificationRequirement
-> UserVerificationRequirement
-> Bounded UserVerificationRequirement
forall a. a -> a -> Bounded a
maxBound :: UserVerificationRequirement
$cmaxBound :: UserVerificationRequirement
minBound :: UserVerificationRequirement
$cminBound :: UserVerificationRequirement
Bounded, Int -> UserVerificationRequirement
UserVerificationRequirement -> Int
UserVerificationRequirement -> [UserVerificationRequirement]
UserVerificationRequirement -> UserVerificationRequirement
UserVerificationRequirement
-> UserVerificationRequirement -> [UserVerificationRequirement]
UserVerificationRequirement
-> UserVerificationRequirement
-> UserVerificationRequirement
-> [UserVerificationRequirement]
(UserVerificationRequirement -> UserVerificationRequirement)
-> (UserVerificationRequirement -> UserVerificationRequirement)
-> (Int -> UserVerificationRequirement)
-> (UserVerificationRequirement -> Int)
-> (UserVerificationRequirement -> [UserVerificationRequirement])
-> (UserVerificationRequirement
-> UserVerificationRequirement -> [UserVerificationRequirement])
-> (UserVerificationRequirement
-> UserVerificationRequirement -> [UserVerificationRequirement])
-> (UserVerificationRequirement
-> UserVerificationRequirement
-> UserVerificationRequirement
-> [UserVerificationRequirement])
-> Enum UserVerificationRequirement
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
enumFromThenTo :: UserVerificationRequirement
-> UserVerificationRequirement
-> UserVerificationRequirement
-> [UserVerificationRequirement]
$cenumFromThenTo :: UserVerificationRequirement
-> UserVerificationRequirement
-> UserVerificationRequirement
-> [UserVerificationRequirement]
enumFromTo :: UserVerificationRequirement
-> UserVerificationRequirement -> [UserVerificationRequirement]
$cenumFromTo :: UserVerificationRequirement
-> UserVerificationRequirement -> [UserVerificationRequirement]
enumFromThen :: UserVerificationRequirement
-> UserVerificationRequirement -> [UserVerificationRequirement]
$cenumFromThen :: UserVerificationRequirement
-> UserVerificationRequirement -> [UserVerificationRequirement]
enumFrom :: UserVerificationRequirement -> [UserVerificationRequirement]
$cenumFrom :: UserVerificationRequirement -> [UserVerificationRequirement]
fromEnum :: UserVerificationRequirement -> Int
$cfromEnum :: UserVerificationRequirement -> Int
toEnum :: Int -> UserVerificationRequirement
$ctoEnum :: Int -> UserVerificationRequirement
pred :: UserVerificationRequirement -> UserVerificationRequirement
$cpred :: UserVerificationRequirement -> UserVerificationRequirement
succ :: UserVerificationRequirement -> UserVerificationRequirement
$csucc :: UserVerificationRequirement -> UserVerificationRequirement
Enum, Eq UserVerificationRequirement
Eq UserVerificationRequirement
-> (UserVerificationRequirement
-> UserVerificationRequirement -> Ordering)
-> (UserVerificationRequirement
-> UserVerificationRequirement -> Bool)
-> (UserVerificationRequirement
-> UserVerificationRequirement -> Bool)
-> (UserVerificationRequirement
-> UserVerificationRequirement -> Bool)
-> (UserVerificationRequirement
-> UserVerificationRequirement -> Bool)
-> (UserVerificationRequirement
-> UserVerificationRequirement -> UserVerificationRequirement)
-> (UserVerificationRequirement
-> UserVerificationRequirement -> UserVerificationRequirement)
-> Ord UserVerificationRequirement
UserVerificationRequirement -> UserVerificationRequirement -> Bool
UserVerificationRequirement
-> UserVerificationRequirement -> Ordering
UserVerificationRequirement
-> UserVerificationRequirement -> UserVerificationRequirement
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 :: UserVerificationRequirement
-> UserVerificationRequirement -> UserVerificationRequirement
$cmin :: UserVerificationRequirement
-> UserVerificationRequirement -> UserVerificationRequirement
max :: UserVerificationRequirement
-> UserVerificationRequirement -> UserVerificationRequirement
$cmax :: UserVerificationRequirement
-> UserVerificationRequirement -> UserVerificationRequirement
>= :: UserVerificationRequirement -> UserVerificationRequirement -> Bool
$c>= :: UserVerificationRequirement -> UserVerificationRequirement -> Bool
> :: UserVerificationRequirement -> UserVerificationRequirement -> Bool
$c> :: UserVerificationRequirement -> UserVerificationRequirement -> Bool
<= :: UserVerificationRequirement -> UserVerificationRequirement -> Bool
$c<= :: UserVerificationRequirement -> UserVerificationRequirement -> Bool
< :: UserVerificationRequirement -> UserVerificationRequirement -> Bool
$c< :: UserVerificationRequirement -> UserVerificationRequirement -> Bool
compare :: UserVerificationRequirement
-> UserVerificationRequirement -> Ordering
$ccompare :: UserVerificationRequirement
-> UserVerificationRequirement -> Ordering
Ord, (forall x.
UserVerificationRequirement -> Rep UserVerificationRequirement x)
-> (forall x.
Rep UserVerificationRequirement x -> UserVerificationRequirement)
-> Generic UserVerificationRequirement
forall x.
Rep UserVerificationRequirement x -> UserVerificationRequirement
forall x.
UserVerificationRequirement -> Rep UserVerificationRequirement x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UserVerificationRequirement x -> UserVerificationRequirement
$cfrom :: forall x.
UserVerificationRequirement -> Rep UserVerificationRequirement x
Generic, [UserVerificationRequirement] -> Encoding
[UserVerificationRequirement] -> Value
UserVerificationRequirement -> Encoding
UserVerificationRequirement -> Value
(UserVerificationRequirement -> Value)
-> (UserVerificationRequirement -> Encoding)
-> ([UserVerificationRequirement] -> Value)
-> ([UserVerificationRequirement] -> Encoding)
-> ToJSON UserVerificationRequirement
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [UserVerificationRequirement] -> Encoding
$ctoEncodingList :: [UserVerificationRequirement] -> Encoding
toJSONList :: [UserVerificationRequirement] -> Value
$ctoJSONList :: [UserVerificationRequirement] -> Value
toEncoding :: UserVerificationRequirement -> Encoding
$ctoEncoding :: UserVerificationRequirement -> Encoding
toJSON :: UserVerificationRequirement -> Value
$ctoJSON :: UserVerificationRequirement -> Value
ToJSON)
data AttestationConveyancePreference
=
AttestationConveyancePreferenceNone
|
AttestationConveyancePreferenceIndirect
|
AttestationConveyancePreferenceDirect
|
AttestationConveyancePreferenceEnterprise
deriving (AttestationConveyancePreference
-> AttestationConveyancePreference -> Bool
(AttestationConveyancePreference
-> AttestationConveyancePreference -> Bool)
-> (AttestationConveyancePreference
-> AttestationConveyancePreference -> Bool)
-> Eq AttestationConveyancePreference
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AttestationConveyancePreference
-> AttestationConveyancePreference -> Bool
$c/= :: AttestationConveyancePreference
-> AttestationConveyancePreference -> Bool
== :: AttestationConveyancePreference
-> AttestationConveyancePreference -> Bool
$c== :: AttestationConveyancePreference
-> AttestationConveyancePreference -> Bool
Eq, Int -> AttestationConveyancePreference -> ShowS
[AttestationConveyancePreference] -> ShowS
AttestationConveyancePreference -> String
(Int -> AttestationConveyancePreference -> ShowS)
-> (AttestationConveyancePreference -> String)
-> ([AttestationConveyancePreference] -> ShowS)
-> Show AttestationConveyancePreference
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AttestationConveyancePreference] -> ShowS
$cshowList :: [AttestationConveyancePreference] -> ShowS
show :: AttestationConveyancePreference -> String
$cshow :: AttestationConveyancePreference -> String
showsPrec :: Int -> AttestationConveyancePreference -> ShowS
$cshowsPrec :: Int -> AttestationConveyancePreference -> ShowS
Show, AttestationConveyancePreference
AttestationConveyancePreference
-> AttestationConveyancePreference
-> Bounded AttestationConveyancePreference
forall a. a -> a -> Bounded a
maxBound :: AttestationConveyancePreference
$cmaxBound :: AttestationConveyancePreference
minBound :: AttestationConveyancePreference
$cminBound :: AttestationConveyancePreference
Bounded, Int -> AttestationConveyancePreference
AttestationConveyancePreference -> Int
AttestationConveyancePreference
-> [AttestationConveyancePreference]
AttestationConveyancePreference -> AttestationConveyancePreference
AttestationConveyancePreference
-> AttestationConveyancePreference
-> [AttestationConveyancePreference]
AttestationConveyancePreference
-> AttestationConveyancePreference
-> AttestationConveyancePreference
-> [AttestationConveyancePreference]
(AttestationConveyancePreference
-> AttestationConveyancePreference)
-> (AttestationConveyancePreference
-> AttestationConveyancePreference)
-> (Int -> AttestationConveyancePreference)
-> (AttestationConveyancePreference -> Int)
-> (AttestationConveyancePreference
-> [AttestationConveyancePreference])
-> (AttestationConveyancePreference
-> AttestationConveyancePreference
-> [AttestationConveyancePreference])
-> (AttestationConveyancePreference
-> AttestationConveyancePreference
-> [AttestationConveyancePreference])
-> (AttestationConveyancePreference
-> AttestationConveyancePreference
-> AttestationConveyancePreference
-> [AttestationConveyancePreference])
-> Enum AttestationConveyancePreference
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
enumFromThenTo :: AttestationConveyancePreference
-> AttestationConveyancePreference
-> AttestationConveyancePreference
-> [AttestationConveyancePreference]
$cenumFromThenTo :: AttestationConveyancePreference
-> AttestationConveyancePreference
-> AttestationConveyancePreference
-> [AttestationConveyancePreference]
enumFromTo :: AttestationConveyancePreference
-> AttestationConveyancePreference
-> [AttestationConveyancePreference]
$cenumFromTo :: AttestationConveyancePreference
-> AttestationConveyancePreference
-> [AttestationConveyancePreference]
enumFromThen :: AttestationConveyancePreference
-> AttestationConveyancePreference
-> [AttestationConveyancePreference]
$cenumFromThen :: AttestationConveyancePreference
-> AttestationConveyancePreference
-> [AttestationConveyancePreference]
enumFrom :: AttestationConveyancePreference
-> [AttestationConveyancePreference]
$cenumFrom :: AttestationConveyancePreference
-> [AttestationConveyancePreference]
fromEnum :: AttestationConveyancePreference -> Int
$cfromEnum :: AttestationConveyancePreference -> Int
toEnum :: Int -> AttestationConveyancePreference
$ctoEnum :: Int -> AttestationConveyancePreference
pred :: AttestationConveyancePreference -> AttestationConveyancePreference
$cpred :: AttestationConveyancePreference -> AttestationConveyancePreference
succ :: AttestationConveyancePreference -> AttestationConveyancePreference
$csucc :: AttestationConveyancePreference -> AttestationConveyancePreference
Enum, Eq AttestationConveyancePreference
Eq AttestationConveyancePreference
-> (AttestationConveyancePreference
-> AttestationConveyancePreference -> Ordering)
-> (AttestationConveyancePreference
-> AttestationConveyancePreference -> Bool)
-> (AttestationConveyancePreference
-> AttestationConveyancePreference -> Bool)
-> (AttestationConveyancePreference
-> AttestationConveyancePreference -> Bool)
-> (AttestationConveyancePreference
-> AttestationConveyancePreference -> Bool)
-> (AttestationConveyancePreference
-> AttestationConveyancePreference
-> AttestationConveyancePreference)
-> (AttestationConveyancePreference
-> AttestationConveyancePreference
-> AttestationConveyancePreference)
-> Ord AttestationConveyancePreference
AttestationConveyancePreference
-> AttestationConveyancePreference -> Bool
AttestationConveyancePreference
-> AttestationConveyancePreference -> Ordering
AttestationConveyancePreference
-> AttestationConveyancePreference
-> AttestationConveyancePreference
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 :: AttestationConveyancePreference
-> AttestationConveyancePreference
-> AttestationConveyancePreference
$cmin :: AttestationConveyancePreference
-> AttestationConveyancePreference
-> AttestationConveyancePreference
max :: AttestationConveyancePreference
-> AttestationConveyancePreference
-> AttestationConveyancePreference
$cmax :: AttestationConveyancePreference
-> AttestationConveyancePreference
-> AttestationConveyancePreference
>= :: AttestationConveyancePreference
-> AttestationConveyancePreference -> Bool
$c>= :: AttestationConveyancePreference
-> AttestationConveyancePreference -> Bool
> :: AttestationConveyancePreference
-> AttestationConveyancePreference -> Bool
$c> :: AttestationConveyancePreference
-> AttestationConveyancePreference -> Bool
<= :: AttestationConveyancePreference
-> AttestationConveyancePreference -> Bool
$c<= :: AttestationConveyancePreference
-> AttestationConveyancePreference -> Bool
< :: AttestationConveyancePreference
-> AttestationConveyancePreference -> Bool
$c< :: AttestationConveyancePreference
-> AttestationConveyancePreference -> Bool
compare :: AttestationConveyancePreference
-> AttestationConveyancePreference -> Ordering
$ccompare :: AttestationConveyancePreference
-> AttestationConveyancePreference -> Ordering
Ord, (forall x.
AttestationConveyancePreference
-> Rep AttestationConveyancePreference x)
-> (forall x.
Rep AttestationConveyancePreference x
-> AttestationConveyancePreference)
-> Generic AttestationConveyancePreference
forall x.
Rep AttestationConveyancePreference x
-> AttestationConveyancePreference
forall x.
AttestationConveyancePreference
-> Rep AttestationConveyancePreference x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AttestationConveyancePreference x
-> AttestationConveyancePreference
$cfrom :: forall x.
AttestationConveyancePreference
-> Rep AttestationConveyancePreference x
Generic, [AttestationConveyancePreference] -> Encoding
[AttestationConveyancePreference] -> Value
AttestationConveyancePreference -> Encoding
AttestationConveyancePreference -> Value
(AttestationConveyancePreference -> Value)
-> (AttestationConveyancePreference -> Encoding)
-> ([AttestationConveyancePreference] -> Value)
-> ([AttestationConveyancePreference] -> Encoding)
-> ToJSON AttestationConveyancePreference
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [AttestationConveyancePreference] -> Encoding
$ctoEncodingList :: [AttestationConveyancePreference] -> Encoding
toJSONList :: [AttestationConveyancePreference] -> Value
$ctoJSONList :: [AttestationConveyancePreference] -> Value
toEncoding :: AttestationConveyancePreference -> Encoding
$ctoEncoding :: AttestationConveyancePreference -> Encoding
toJSON :: AttestationConveyancePreference -> Value
$ctoJSON :: AttestationConveyancePreference -> Value
ToJSON)
data AttestationChain (p :: ProtocolKind) where
Fido2Chain :: NonEmpty X509.SignedCertificate -> AttestationChain 'Fido2
FidoU2FCert :: X509.SignedCertificate -> AttestationChain 'FidoU2F
deriving instance Eq (AttestationChain p)
deriving instance Show (AttestationChain p)
instance ToJSON (AttestationChain p) where
toJSON :: AttestationChain p -> Value
toJSON (Fido2Chain NonEmpty SignedCertificate
chain) = NonEmpty SignedCertificate -> Value
forall a. ToJSON a => a -> Value
toJSON NonEmpty SignedCertificate
chain
toJSON (FidoU2FCert SignedCertificate
cert) = [SignedCertificate] -> Value
forall a. ToJSON a => a -> Value
toJSON [SignedCertificate
cert]
data VerifiableAttestationType
=
VerifiableAttestationTypeUncertain
|
VerifiableAttestationTypeBasic
|
VerifiableAttestationTypeAttCA
|
VerifiableAttestationTypeAnonCA
deriving (VerifiableAttestationType -> VerifiableAttestationType -> Bool
(VerifiableAttestationType -> VerifiableAttestationType -> Bool)
-> (VerifiableAttestationType -> VerifiableAttestationType -> Bool)
-> Eq VerifiableAttestationType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VerifiableAttestationType -> VerifiableAttestationType -> Bool
$c/= :: VerifiableAttestationType -> VerifiableAttestationType -> Bool
== :: VerifiableAttestationType -> VerifiableAttestationType -> Bool
$c== :: VerifiableAttestationType -> VerifiableAttestationType -> Bool
Eq, Int -> VerifiableAttestationType -> ShowS
[VerifiableAttestationType] -> ShowS
VerifiableAttestationType -> String
(Int -> VerifiableAttestationType -> ShowS)
-> (VerifiableAttestationType -> String)
-> ([VerifiableAttestationType] -> ShowS)
-> Show VerifiableAttestationType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [VerifiableAttestationType] -> ShowS
$cshowList :: [VerifiableAttestationType] -> ShowS
show :: VerifiableAttestationType -> String
$cshow :: VerifiableAttestationType -> String
showsPrec :: Int -> VerifiableAttestationType -> ShowS
$cshowsPrec :: Int -> VerifiableAttestationType -> ShowS
Show, VerifiableAttestationType
VerifiableAttestationType
-> VerifiableAttestationType -> Bounded VerifiableAttestationType
forall a. a -> a -> Bounded a
maxBound :: VerifiableAttestationType
$cmaxBound :: VerifiableAttestationType
minBound :: VerifiableAttestationType
$cminBound :: VerifiableAttestationType
Bounded, Int -> VerifiableAttestationType
VerifiableAttestationType -> Int
VerifiableAttestationType -> [VerifiableAttestationType]
VerifiableAttestationType -> VerifiableAttestationType
VerifiableAttestationType
-> VerifiableAttestationType -> [VerifiableAttestationType]
VerifiableAttestationType
-> VerifiableAttestationType
-> VerifiableAttestationType
-> [VerifiableAttestationType]
(VerifiableAttestationType -> VerifiableAttestationType)
-> (VerifiableAttestationType -> VerifiableAttestationType)
-> (Int -> VerifiableAttestationType)
-> (VerifiableAttestationType -> Int)
-> (VerifiableAttestationType -> [VerifiableAttestationType])
-> (VerifiableAttestationType
-> VerifiableAttestationType -> [VerifiableAttestationType])
-> (VerifiableAttestationType
-> VerifiableAttestationType -> [VerifiableAttestationType])
-> (VerifiableAttestationType
-> VerifiableAttestationType
-> VerifiableAttestationType
-> [VerifiableAttestationType])
-> Enum VerifiableAttestationType
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
enumFromThenTo :: VerifiableAttestationType
-> VerifiableAttestationType
-> VerifiableAttestationType
-> [VerifiableAttestationType]
$cenumFromThenTo :: VerifiableAttestationType
-> VerifiableAttestationType
-> VerifiableAttestationType
-> [VerifiableAttestationType]
enumFromTo :: VerifiableAttestationType
-> VerifiableAttestationType -> [VerifiableAttestationType]
$cenumFromTo :: VerifiableAttestationType
-> VerifiableAttestationType -> [VerifiableAttestationType]
enumFromThen :: VerifiableAttestationType
-> VerifiableAttestationType -> [VerifiableAttestationType]
$cenumFromThen :: VerifiableAttestationType
-> VerifiableAttestationType -> [VerifiableAttestationType]
enumFrom :: VerifiableAttestationType -> [VerifiableAttestationType]
$cenumFrom :: VerifiableAttestationType -> [VerifiableAttestationType]
fromEnum :: VerifiableAttestationType -> Int
$cfromEnum :: VerifiableAttestationType -> Int
toEnum :: Int -> VerifiableAttestationType
$ctoEnum :: Int -> VerifiableAttestationType
pred :: VerifiableAttestationType -> VerifiableAttestationType
$cpred :: VerifiableAttestationType -> VerifiableAttestationType
succ :: VerifiableAttestationType -> VerifiableAttestationType
$csucc :: VerifiableAttestationType -> VerifiableAttestationType
Enum, Eq VerifiableAttestationType
Eq VerifiableAttestationType
-> (VerifiableAttestationType
-> VerifiableAttestationType -> Ordering)
-> (VerifiableAttestationType -> VerifiableAttestationType -> Bool)
-> (VerifiableAttestationType -> VerifiableAttestationType -> Bool)
-> (VerifiableAttestationType -> VerifiableAttestationType -> Bool)
-> (VerifiableAttestationType -> VerifiableAttestationType -> Bool)
-> (VerifiableAttestationType
-> VerifiableAttestationType -> VerifiableAttestationType)
-> (VerifiableAttestationType
-> VerifiableAttestationType -> VerifiableAttestationType)
-> Ord VerifiableAttestationType
VerifiableAttestationType -> VerifiableAttestationType -> Bool
VerifiableAttestationType -> VerifiableAttestationType -> Ordering
VerifiableAttestationType
-> VerifiableAttestationType -> VerifiableAttestationType
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 :: VerifiableAttestationType
-> VerifiableAttestationType -> VerifiableAttestationType
$cmin :: VerifiableAttestationType
-> VerifiableAttestationType -> VerifiableAttestationType
max :: VerifiableAttestationType
-> VerifiableAttestationType -> VerifiableAttestationType
$cmax :: VerifiableAttestationType
-> VerifiableAttestationType -> VerifiableAttestationType
>= :: VerifiableAttestationType -> VerifiableAttestationType -> Bool
$c>= :: VerifiableAttestationType -> VerifiableAttestationType -> Bool
> :: VerifiableAttestationType -> VerifiableAttestationType -> Bool
$c> :: VerifiableAttestationType -> VerifiableAttestationType -> Bool
<= :: VerifiableAttestationType -> VerifiableAttestationType -> Bool
$c<= :: VerifiableAttestationType -> VerifiableAttestationType -> Bool
< :: VerifiableAttestationType -> VerifiableAttestationType -> Bool
$c< :: VerifiableAttestationType -> VerifiableAttestationType -> Bool
compare :: VerifiableAttestationType -> VerifiableAttestationType -> Ordering
$ccompare :: VerifiableAttestationType -> VerifiableAttestationType -> Ordering
Ord, (forall x.
VerifiableAttestationType -> Rep VerifiableAttestationType x)
-> (forall x.
Rep VerifiableAttestationType x -> VerifiableAttestationType)
-> Generic VerifiableAttestationType
forall x.
Rep VerifiableAttestationType x -> VerifiableAttestationType
forall x.
VerifiableAttestationType -> Rep VerifiableAttestationType x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep VerifiableAttestationType x -> VerifiableAttestationType
$cfrom :: forall x.
VerifiableAttestationType -> Rep VerifiableAttestationType x
Generic, [VerifiableAttestationType] -> Encoding
[VerifiableAttestationType] -> Value
VerifiableAttestationType -> Encoding
VerifiableAttestationType -> Value
(VerifiableAttestationType -> Value)
-> (VerifiableAttestationType -> Encoding)
-> ([VerifiableAttestationType] -> Value)
-> ([VerifiableAttestationType] -> Encoding)
-> ToJSON VerifiableAttestationType
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [VerifiableAttestationType] -> Encoding
$ctoEncodingList :: [VerifiableAttestationType] -> Encoding
toJSONList :: [VerifiableAttestationType] -> Value
$ctoJSONList :: [VerifiableAttestationType] -> Value
toEncoding :: VerifiableAttestationType -> Encoding
$ctoEncoding :: VerifiableAttestationType -> Encoding
toJSON :: VerifiableAttestationType -> Value
$ctoJSON :: VerifiableAttestationType -> Value
ToJSON)
data AttestationType (k :: AttestationKind) where
AttestationTypeNone :: AttestationType 'Unverifiable
AttestationTypeSelf :: AttestationType 'Unverifiable
AttestationTypeVerifiable ::
{
forall (p :: ProtocolKind).
AttestationType ('Verifiable p) -> VerifiableAttestationType
atvType :: VerifiableAttestationType,
forall (p :: ProtocolKind).
AttestationType ('Verifiable p) -> AttestationChain p
atvChain :: AttestationChain p
} ->
AttestationType ('Verifiable p)
deriving instance Eq (AttestationType k)
deriving instance Show (AttestationType k)
instance ToJSON (AttestationType k) where
toJSON :: AttestationType k -> Value
toJSON AttestationType k
AttestationTypeNone =
[Pair] -> Value
object
[ Key
"tag" Key -> Value -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text -> Value
String Text
"AttestationTypeNone"
]
toJSON AttestationType k
AttestationTypeSelf =
[Pair] -> Value
object
[ Key
"tag" Key -> Value -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text -> Value
String Text
"AttestationTypeSelf"
]
toJSON AttestationTypeVerifiable {VerifiableAttestationType
AttestationChain p
atvChain :: AttestationChain p
atvType :: VerifiableAttestationType
atvChain :: forall (p :: ProtocolKind).
AttestationType ('Verifiable p) -> AttestationChain p
atvType :: forall (p :: ProtocolKind).
AttestationType ('Verifiable p) -> VerifiableAttestationType
..} =
[Pair] -> Value
object
[ Key
"tag" Key -> Value -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text -> Value
String Text
"AttestationTypeVerifiable",
Key
"atvType" Key -> VerifiableAttestationType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= VerifiableAttestationType
atvType,
Key
"atvChain" Key -> AttestationChain p -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= AttestationChain p
atvChain
]
newtype RpId = RpId {RpId -> Text
unRpId :: Text}
deriving (RpId -> RpId -> Bool
(RpId -> RpId -> Bool) -> (RpId -> RpId -> Bool) -> Eq RpId
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RpId -> RpId -> Bool
$c/= :: RpId -> RpId -> Bool
== :: RpId -> RpId -> Bool
$c== :: RpId -> RpId -> Bool
Eq, Int -> RpId -> ShowS
[RpId] -> ShowS
RpId -> String
(Int -> RpId -> ShowS)
-> (RpId -> String) -> ([RpId] -> ShowS) -> Show RpId
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RpId] -> ShowS
$cshowList :: [RpId] -> ShowS
show :: RpId -> String
$cshow :: RpId -> String
showsPrec :: Int -> RpId -> ShowS
$cshowsPrec :: Int -> RpId -> ShowS
Show, Eq RpId
Eq RpId
-> (RpId -> RpId -> Ordering)
-> (RpId -> RpId -> Bool)
-> (RpId -> RpId -> Bool)
-> (RpId -> RpId -> Bool)
-> (RpId -> RpId -> Bool)
-> (RpId -> RpId -> RpId)
-> (RpId -> RpId -> RpId)
-> Ord RpId
RpId -> RpId -> Bool
RpId -> RpId -> Ordering
RpId -> RpId -> RpId
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 :: RpId -> RpId -> RpId
$cmin :: RpId -> RpId -> RpId
max :: RpId -> RpId -> RpId
$cmax :: RpId -> RpId -> RpId
>= :: RpId -> RpId -> Bool
$c>= :: RpId -> RpId -> Bool
> :: RpId -> RpId -> Bool
$c> :: RpId -> RpId -> Bool
<= :: RpId -> RpId -> Bool
$c<= :: RpId -> RpId -> Bool
< :: RpId -> RpId -> Bool
$c< :: RpId -> RpId -> Bool
compare :: RpId -> RpId -> Ordering
$ccompare :: RpId -> RpId -> Ordering
Ord)
deriving newtype (String -> RpId
(String -> RpId) -> IsString RpId
forall a. (String -> a) -> IsString a
fromString :: String -> RpId
$cfromString :: String -> RpId
IsString, [RpId] -> Encoding
[RpId] -> Value
RpId -> Encoding
RpId -> Value
(RpId -> Value)
-> (RpId -> Encoding)
-> ([RpId] -> Value)
-> ([RpId] -> Encoding)
-> ToJSON RpId
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [RpId] -> Encoding
$ctoEncodingList :: [RpId] -> Encoding
toJSONList :: [RpId] -> Value
$ctoJSONList :: [RpId] -> Value
toEncoding :: RpId -> Encoding
$ctoEncoding :: RpId -> Encoding
toJSON :: RpId -> Value
$ctoJSON :: RpId -> Value
ToJSON)
newtype RelyingPartyName = RelyingPartyName {RelyingPartyName -> Text
unRelyingPartyName :: Text}
deriving (RelyingPartyName -> RelyingPartyName -> Bool
(RelyingPartyName -> RelyingPartyName -> Bool)
-> (RelyingPartyName -> RelyingPartyName -> Bool)
-> Eq RelyingPartyName
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RelyingPartyName -> RelyingPartyName -> Bool
$c/= :: RelyingPartyName -> RelyingPartyName -> Bool
== :: RelyingPartyName -> RelyingPartyName -> Bool
$c== :: RelyingPartyName -> RelyingPartyName -> Bool
Eq, Int -> RelyingPartyName -> ShowS
[RelyingPartyName] -> ShowS
RelyingPartyName -> String
(Int -> RelyingPartyName -> ShowS)
-> (RelyingPartyName -> String)
-> ([RelyingPartyName] -> ShowS)
-> Show RelyingPartyName
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RelyingPartyName] -> ShowS
$cshowList :: [RelyingPartyName] -> ShowS
show :: RelyingPartyName -> String
$cshow :: RelyingPartyName -> String
showsPrec :: Int -> RelyingPartyName -> ShowS
$cshowsPrec :: Int -> RelyingPartyName -> ShowS
Show)
deriving newtype (String -> RelyingPartyName
(String -> RelyingPartyName) -> IsString RelyingPartyName
forall a. (String -> a) -> IsString a
fromString :: String -> RelyingPartyName
$cfromString :: String -> RelyingPartyName
IsString, [RelyingPartyName] -> Encoding
[RelyingPartyName] -> Value
RelyingPartyName -> Encoding
RelyingPartyName -> Value
(RelyingPartyName -> Value)
-> (RelyingPartyName -> Encoding)
-> ([RelyingPartyName] -> Value)
-> ([RelyingPartyName] -> Encoding)
-> ToJSON RelyingPartyName
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [RelyingPartyName] -> Encoding
$ctoEncodingList :: [RelyingPartyName] -> Encoding
toJSONList :: [RelyingPartyName] -> Value
$ctoJSONList :: [RelyingPartyName] -> Value
toEncoding :: RelyingPartyName -> Encoding
$ctoEncoding :: RelyingPartyName -> Encoding
toJSON :: RelyingPartyName -> Value
$ctoJSON :: RelyingPartyName -> Value
ToJSON)
newtype UserHandle = UserHandle {UserHandle -> ByteString
unUserHandle :: BS.ByteString}
deriving (UserHandle -> UserHandle -> Bool
(UserHandle -> UserHandle -> Bool)
-> (UserHandle -> UserHandle -> Bool) -> Eq UserHandle
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UserHandle -> UserHandle -> Bool
$c/= :: UserHandle -> UserHandle -> Bool
== :: UserHandle -> UserHandle -> Bool
$c== :: UserHandle -> UserHandle -> Bool
Eq, Int -> UserHandle -> ShowS
[UserHandle] -> ShowS
UserHandle -> String
(Int -> UserHandle -> ShowS)
-> (UserHandle -> String)
-> ([UserHandle] -> ShowS)
-> Show UserHandle
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UserHandle] -> ShowS
$cshowList :: [UserHandle] -> ShowS
show :: UserHandle -> String
$cshow :: UserHandle -> String
showsPrec :: Int -> UserHandle -> ShowS
$cshowsPrec :: Int -> UserHandle -> ShowS
Show, Eq UserHandle
Eq UserHandle
-> (UserHandle -> UserHandle -> Ordering)
-> (UserHandle -> UserHandle -> Bool)
-> (UserHandle -> UserHandle -> Bool)
-> (UserHandle -> UserHandle -> Bool)
-> (UserHandle -> UserHandle -> Bool)
-> (UserHandle -> UserHandle -> UserHandle)
-> (UserHandle -> UserHandle -> UserHandle)
-> Ord UserHandle
UserHandle -> UserHandle -> Bool
UserHandle -> UserHandle -> Ordering
UserHandle -> UserHandle -> UserHandle
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 :: UserHandle -> UserHandle -> UserHandle
$cmin :: UserHandle -> UserHandle -> UserHandle
max :: UserHandle -> UserHandle -> UserHandle
$cmax :: UserHandle -> UserHandle -> UserHandle
>= :: UserHandle -> UserHandle -> Bool
$c>= :: UserHandle -> UserHandle -> Bool
> :: UserHandle -> UserHandle -> Bool
$c> :: UserHandle -> UserHandle -> Bool
<= :: UserHandle -> UserHandle -> Bool
$c<= :: UserHandle -> UserHandle -> Bool
< :: UserHandle -> UserHandle -> Bool
$c< :: UserHandle -> UserHandle -> Bool
compare :: UserHandle -> UserHandle -> Ordering
$ccompare :: UserHandle -> UserHandle -> Ordering
Ord)
deriving newtype ([UserHandle] -> Encoding
[UserHandle] -> Value
UserHandle -> Encoding
UserHandle -> Value
(UserHandle -> Value)
-> (UserHandle -> Encoding)
-> ([UserHandle] -> Value)
-> ([UserHandle] -> Encoding)
-> ToJSON UserHandle
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [UserHandle] -> Encoding
$ctoEncodingList :: [UserHandle] -> Encoding
toJSONList :: [UserHandle] -> Value
$ctoJSONList :: [UserHandle] -> Value
toEncoding :: UserHandle -> Encoding
$ctoEncoding :: UserHandle -> Encoding
toJSON :: UserHandle -> Value
$ctoJSON :: UserHandle -> Value
ToJSON)
generateUserHandle :: MonadRandom m => m UserHandle
generateUserHandle :: forall (m :: * -> *). MonadRandom m => m UserHandle
generateUserHandle = ByteString -> UserHandle
UserHandle (ByteString -> UserHandle) -> m ByteString -> m UserHandle
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Int -> m ByteString
forall (m :: * -> *) byteArray.
(MonadRandom m, ByteArray byteArray) =>
Int -> m byteArray
getRandomBytes Int
16
newtype UserAccountDisplayName = UserAccountDisplayName {UserAccountDisplayName -> Text
unUserAccountDisplayName :: Text}
deriving (UserAccountDisplayName -> UserAccountDisplayName -> Bool
(UserAccountDisplayName -> UserAccountDisplayName -> Bool)
-> (UserAccountDisplayName -> UserAccountDisplayName -> Bool)
-> Eq UserAccountDisplayName
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UserAccountDisplayName -> UserAccountDisplayName -> Bool
$c/= :: UserAccountDisplayName -> UserAccountDisplayName -> Bool
== :: UserAccountDisplayName -> UserAccountDisplayName -> Bool
$c== :: UserAccountDisplayName -> UserAccountDisplayName -> Bool
Eq, Int -> UserAccountDisplayName -> ShowS
[UserAccountDisplayName] -> ShowS
UserAccountDisplayName -> String
(Int -> UserAccountDisplayName -> ShowS)
-> (UserAccountDisplayName -> String)
-> ([UserAccountDisplayName] -> ShowS)
-> Show UserAccountDisplayName
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UserAccountDisplayName] -> ShowS
$cshowList :: [UserAccountDisplayName] -> ShowS
show :: UserAccountDisplayName -> String
$cshow :: UserAccountDisplayName -> String
showsPrec :: Int -> UserAccountDisplayName -> ShowS
$cshowsPrec :: Int -> UserAccountDisplayName -> ShowS
Show)
deriving newtype (String -> UserAccountDisplayName
(String -> UserAccountDisplayName)
-> IsString UserAccountDisplayName
forall a. (String -> a) -> IsString a
fromString :: String -> UserAccountDisplayName
$cfromString :: String -> UserAccountDisplayName
IsString, [UserAccountDisplayName] -> Encoding
[UserAccountDisplayName] -> Value
UserAccountDisplayName -> Encoding
UserAccountDisplayName -> Value
(UserAccountDisplayName -> Value)
-> (UserAccountDisplayName -> Encoding)
-> ([UserAccountDisplayName] -> Value)
-> ([UserAccountDisplayName] -> Encoding)
-> ToJSON UserAccountDisplayName
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [UserAccountDisplayName] -> Encoding
$ctoEncodingList :: [UserAccountDisplayName] -> Encoding
toJSONList :: [UserAccountDisplayName] -> Value
$ctoJSONList :: [UserAccountDisplayName] -> Value
toEncoding :: UserAccountDisplayName -> Encoding
$ctoEncoding :: UserAccountDisplayName -> Encoding
toJSON :: UserAccountDisplayName -> Value
$ctoJSON :: UserAccountDisplayName -> Value
ToJSON)
newtype UserAccountName = UserAccountName {UserAccountName -> Text
unUserAccountName :: Text}
deriving (UserAccountName -> UserAccountName -> Bool
(UserAccountName -> UserAccountName -> Bool)
-> (UserAccountName -> UserAccountName -> Bool)
-> Eq UserAccountName
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UserAccountName -> UserAccountName -> Bool
$c/= :: UserAccountName -> UserAccountName -> Bool
== :: UserAccountName -> UserAccountName -> Bool
$c== :: UserAccountName -> UserAccountName -> Bool
Eq, Int -> UserAccountName -> ShowS
[UserAccountName] -> ShowS
UserAccountName -> String
(Int -> UserAccountName -> ShowS)
-> (UserAccountName -> String)
-> ([UserAccountName] -> ShowS)
-> Show UserAccountName
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UserAccountName] -> ShowS
$cshowList :: [UserAccountName] -> ShowS
show :: UserAccountName -> String
$cshow :: UserAccountName -> String
showsPrec :: Int -> UserAccountName -> ShowS
$cshowsPrec :: Int -> UserAccountName -> ShowS
Show)
deriving newtype (String -> UserAccountName
(String -> UserAccountName) -> IsString UserAccountName
forall a. (String -> a) -> IsString a
fromString :: String -> UserAccountName
$cfromString :: String -> UserAccountName
IsString, [UserAccountName] -> Encoding
[UserAccountName] -> Value
UserAccountName -> Encoding
UserAccountName -> Value
(UserAccountName -> Value)
-> (UserAccountName -> Encoding)
-> ([UserAccountName] -> Value)
-> ([UserAccountName] -> Encoding)
-> ToJSON UserAccountName
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [UserAccountName] -> Encoding
$ctoEncodingList :: [UserAccountName] -> Encoding
toJSONList :: [UserAccountName] -> Value
$ctoJSONList :: [UserAccountName] -> Value
toEncoding :: UserAccountName -> Encoding
$ctoEncoding :: UserAccountName -> Encoding
toJSON :: UserAccountName -> Value
$ctoJSON :: UserAccountName -> Value
ToJSON)
newtype CredentialId = CredentialId {CredentialId -> ByteString
unCredentialId :: BS.ByteString}
deriving (CredentialId -> CredentialId -> Bool
(CredentialId -> CredentialId -> Bool)
-> (CredentialId -> CredentialId -> Bool) -> Eq CredentialId
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CredentialId -> CredentialId -> Bool
$c/= :: CredentialId -> CredentialId -> Bool
== :: CredentialId -> CredentialId -> Bool
$c== :: CredentialId -> CredentialId -> Bool
Eq, Int -> CredentialId -> ShowS
[CredentialId] -> ShowS
CredentialId -> String
(Int -> CredentialId -> ShowS)
-> (CredentialId -> String)
-> ([CredentialId] -> ShowS)
-> Show CredentialId
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CredentialId] -> ShowS
$cshowList :: [CredentialId] -> ShowS
show :: CredentialId -> String
$cshow :: CredentialId -> String
showsPrec :: Int -> CredentialId -> ShowS
$cshowsPrec :: Int -> CredentialId -> ShowS
Show, Eq CredentialId
Eq CredentialId
-> (CredentialId -> CredentialId -> Ordering)
-> (CredentialId -> CredentialId -> Bool)
-> (CredentialId -> CredentialId -> Bool)
-> (CredentialId -> CredentialId -> Bool)
-> (CredentialId -> CredentialId -> Bool)
-> (CredentialId -> CredentialId -> CredentialId)
-> (CredentialId -> CredentialId -> CredentialId)
-> Ord CredentialId
CredentialId -> CredentialId -> Bool
CredentialId -> CredentialId -> Ordering
CredentialId -> CredentialId -> CredentialId
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 :: CredentialId -> CredentialId -> CredentialId
$cmin :: CredentialId -> CredentialId -> CredentialId
max :: CredentialId -> CredentialId -> CredentialId
$cmax :: CredentialId -> CredentialId -> CredentialId
>= :: CredentialId -> CredentialId -> Bool
$c>= :: CredentialId -> CredentialId -> Bool
> :: CredentialId -> CredentialId -> Bool
$c> :: CredentialId -> CredentialId -> Bool
<= :: CredentialId -> CredentialId -> Bool
$c<= :: CredentialId -> CredentialId -> Bool
< :: CredentialId -> CredentialId -> Bool
$c< :: CredentialId -> CredentialId -> Bool
compare :: CredentialId -> CredentialId -> Ordering
$ccompare :: CredentialId -> CredentialId -> Ordering
Ord)
deriving newtype ([CredentialId] -> Encoding
[CredentialId] -> Value
CredentialId -> Encoding
CredentialId -> Value
(CredentialId -> Value)
-> (CredentialId -> Encoding)
-> ([CredentialId] -> Value)
-> ([CredentialId] -> Encoding)
-> ToJSON CredentialId
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [CredentialId] -> Encoding
$ctoEncodingList :: [CredentialId] -> Encoding
toJSONList :: [CredentialId] -> Value
$ctoJSONList :: [CredentialId] -> Value
toEncoding :: CredentialId -> Encoding
$ctoEncoding :: CredentialId -> Encoding
toJSON :: CredentialId -> Value
$ctoJSON :: CredentialId -> Value
ToJSON)
generateCredentialId :: MonadRandom m => m CredentialId
generateCredentialId :: forall (m :: * -> *). MonadRandom m => m CredentialId
generateCredentialId = ByteString -> CredentialId
CredentialId (ByteString -> CredentialId) -> m ByteString -> m CredentialId
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Int -> m ByteString
forall (m :: * -> *) byteArray.
(MonadRandom m, ByteArray byteArray) =>
Int -> m byteArray
getRandomBytes Int
16
newtype Challenge = Challenge {Challenge -> ByteString
unChallenge :: BS.ByteString}
deriving (Challenge -> Challenge -> Bool
(Challenge -> Challenge -> Bool)
-> (Challenge -> Challenge -> Bool) -> Eq Challenge
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Challenge -> Challenge -> Bool
$c/= :: Challenge -> Challenge -> Bool
== :: Challenge -> Challenge -> Bool
$c== :: Challenge -> Challenge -> Bool
Eq, Int -> Challenge -> ShowS
[Challenge] -> ShowS
Challenge -> String
(Int -> Challenge -> ShowS)
-> (Challenge -> String)
-> ([Challenge] -> ShowS)
-> Show Challenge
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Challenge] -> ShowS
$cshowList :: [Challenge] -> ShowS
show :: Challenge -> String
$cshow :: Challenge -> String
showsPrec :: Int -> Challenge -> ShowS
$cshowsPrec :: Int -> Challenge -> ShowS
Show, Eq Challenge
Eq Challenge
-> (Challenge -> Challenge -> Ordering)
-> (Challenge -> Challenge -> Bool)
-> (Challenge -> Challenge -> Bool)
-> (Challenge -> Challenge -> Bool)
-> (Challenge -> Challenge -> Bool)
-> (Challenge -> Challenge -> Challenge)
-> (Challenge -> Challenge -> Challenge)
-> Ord Challenge
Challenge -> Challenge -> Bool
Challenge -> Challenge -> Ordering
Challenge -> Challenge -> Challenge
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 :: Challenge -> Challenge -> Challenge
$cmin :: Challenge -> Challenge -> Challenge
max :: Challenge -> Challenge -> Challenge
$cmax :: Challenge -> Challenge -> Challenge
>= :: Challenge -> Challenge -> Bool
$c>= :: Challenge -> Challenge -> Bool
> :: Challenge -> Challenge -> Bool
$c> :: Challenge -> Challenge -> Bool
<= :: Challenge -> Challenge -> Bool
$c<= :: Challenge -> Challenge -> Bool
< :: Challenge -> Challenge -> Bool
$c< :: Challenge -> Challenge -> Bool
compare :: Challenge -> Challenge -> Ordering
$ccompare :: Challenge -> Challenge -> Ordering
Ord)
deriving newtype ([Challenge] -> Encoding
[Challenge] -> Value
Challenge -> Encoding
Challenge -> Value
(Challenge -> Value)
-> (Challenge -> Encoding)
-> ([Challenge] -> Value)
-> ([Challenge] -> Encoding)
-> ToJSON Challenge
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [Challenge] -> Encoding
$ctoEncodingList :: [Challenge] -> Encoding
toJSONList :: [Challenge] -> Value
$ctoJSONList :: [Challenge] -> Value
toEncoding :: Challenge -> Encoding
$ctoEncoding :: Challenge -> Encoding
toJSON :: Challenge -> Value
$ctoJSON :: Challenge -> Value
ToJSON)
generateChallenge :: MonadRandom m => m Challenge
generateChallenge :: forall (m :: * -> *). MonadRandom m => m Challenge
generateChallenge = ByteString -> Challenge
Challenge (ByteString -> Challenge) -> m ByteString -> m Challenge
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> Int -> m ByteString
forall (m :: * -> *) byteArray.
(MonadRandom m, ByteArray byteArray) =>
Int -> m byteArray
getRandomBytes Int
16
newtype Timeout = Timeout {Timeout -> Word32
unTimeout :: Word32}
deriving (Timeout -> Timeout -> Bool
(Timeout -> Timeout -> Bool)
-> (Timeout -> Timeout -> Bool) -> Eq Timeout
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Timeout -> Timeout -> Bool
$c/= :: Timeout -> Timeout -> Bool
== :: Timeout -> Timeout -> Bool
$c== :: Timeout -> Timeout -> Bool
Eq, Int -> Timeout -> ShowS
[Timeout] -> ShowS
Timeout -> String
(Int -> Timeout -> ShowS)
-> (Timeout -> String) -> ([Timeout] -> ShowS) -> Show Timeout
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Timeout] -> ShowS
$cshowList :: [Timeout] -> ShowS
show :: Timeout -> String
$cshow :: Timeout -> String
showsPrec :: Int -> Timeout -> ShowS
$cshowsPrec :: Int -> Timeout -> ShowS
Show)
deriving newtype ([Timeout] -> Encoding
[Timeout] -> Value
Timeout -> Encoding
Timeout -> Value
(Timeout -> Value)
-> (Timeout -> Encoding)
-> ([Timeout] -> Value)
-> ([Timeout] -> Encoding)
-> ToJSON Timeout
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [Timeout] -> Encoding
$ctoEncodingList :: [Timeout] -> Encoding
toJSONList :: [Timeout] -> Value
$ctoJSONList :: [Timeout] -> Value
toEncoding :: Timeout -> Encoding
$ctoEncoding :: Timeout -> Encoding
toJSON :: Timeout -> Value
$ctoJSON :: Timeout -> Value
ToJSON)
newtype AssertionSignature = AssertionSignature {AssertionSignature -> ByteString
unAssertionSignature :: BS.ByteString}
deriving (AssertionSignature -> AssertionSignature -> Bool
(AssertionSignature -> AssertionSignature -> Bool)
-> (AssertionSignature -> AssertionSignature -> Bool)
-> Eq AssertionSignature
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AssertionSignature -> AssertionSignature -> Bool
$c/= :: AssertionSignature -> AssertionSignature -> Bool
== :: AssertionSignature -> AssertionSignature -> Bool
$c== :: AssertionSignature -> AssertionSignature -> Bool
Eq, Int -> AssertionSignature -> ShowS
[AssertionSignature] -> ShowS
AssertionSignature -> String
(Int -> AssertionSignature -> ShowS)
-> (AssertionSignature -> String)
-> ([AssertionSignature] -> ShowS)
-> Show AssertionSignature
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AssertionSignature] -> ShowS
$cshowList :: [AssertionSignature] -> ShowS
show :: AssertionSignature -> String
$cshow :: AssertionSignature -> String
showsPrec :: Int -> AssertionSignature -> ShowS
$cshowsPrec :: Int -> AssertionSignature -> ShowS
Show)
deriving newtype ([AssertionSignature] -> Encoding
[AssertionSignature] -> Value
AssertionSignature -> Encoding
AssertionSignature -> Value
(AssertionSignature -> Value)
-> (AssertionSignature -> Encoding)
-> ([AssertionSignature] -> Value)
-> ([AssertionSignature] -> Encoding)
-> ToJSON AssertionSignature
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [AssertionSignature] -> Encoding
$ctoEncodingList :: [AssertionSignature] -> Encoding
toJSONList :: [AssertionSignature] -> Value
$ctoJSONList :: [AssertionSignature] -> Value
toEncoding :: AssertionSignature -> Encoding
$ctoEncoding :: AssertionSignature -> Encoding
toJSON :: AssertionSignature -> Value
$ctoJSON :: AssertionSignature -> Value
ToJSON)
newtype RpIdHash = RpIdHash {RpIdHash -> Digest SHA256
unRpIdHash :: Digest SHA256}
deriving (RpIdHash -> RpIdHash -> Bool
(RpIdHash -> RpIdHash -> Bool)
-> (RpIdHash -> RpIdHash -> Bool) -> Eq RpIdHash
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RpIdHash -> RpIdHash -> Bool
$c/= :: RpIdHash -> RpIdHash -> Bool
== :: RpIdHash -> RpIdHash -> Bool
$c== :: RpIdHash -> RpIdHash -> Bool
Eq, Int -> RpIdHash -> ShowS
[RpIdHash] -> ShowS
RpIdHash -> String
(Int -> RpIdHash -> ShowS)
-> (RpIdHash -> String) -> ([RpIdHash] -> ShowS) -> Show RpIdHash
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RpIdHash] -> ShowS
$cshowList :: [RpIdHash] -> ShowS
show :: RpIdHash -> String
$cshow :: RpIdHash -> String
showsPrec :: Int -> RpIdHash -> ShowS
$cshowsPrec :: Int -> RpIdHash -> ShowS
Show)
deriving newtype ([RpIdHash] -> Encoding
[RpIdHash] -> Value
RpIdHash -> Encoding
RpIdHash -> Value
(RpIdHash -> Value)
-> (RpIdHash -> Encoding)
-> ([RpIdHash] -> Value)
-> ([RpIdHash] -> Encoding)
-> ToJSON RpIdHash
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [RpIdHash] -> Encoding
$ctoEncodingList :: [RpIdHash] -> Encoding
toJSONList :: [RpIdHash] -> Value
$ctoJSONList :: [RpIdHash] -> Value
toEncoding :: RpIdHash -> Encoding
$ctoEncoding :: RpIdHash -> Encoding
toJSON :: RpIdHash -> Value
$ctoJSON :: RpIdHash -> Value
ToJSON)
newtype ClientDataHash = ClientDataHash {ClientDataHash -> Digest SHA256
unClientDataHash :: Digest SHA256}
deriving (ClientDataHash -> ClientDataHash -> Bool
(ClientDataHash -> ClientDataHash -> Bool)
-> (ClientDataHash -> ClientDataHash -> Bool) -> Eq ClientDataHash
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ClientDataHash -> ClientDataHash -> Bool
$c/= :: ClientDataHash -> ClientDataHash -> Bool
== :: ClientDataHash -> ClientDataHash -> Bool
$c== :: ClientDataHash -> ClientDataHash -> Bool
Eq, Int -> ClientDataHash -> ShowS
[ClientDataHash] -> ShowS
ClientDataHash -> String
(Int -> ClientDataHash -> ShowS)
-> (ClientDataHash -> String)
-> ([ClientDataHash] -> ShowS)
-> Show ClientDataHash
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ClientDataHash] -> ShowS
$cshowList :: [ClientDataHash] -> ShowS
show :: ClientDataHash -> String
$cshow :: ClientDataHash -> String
showsPrec :: Int -> ClientDataHash -> ShowS
$cshowsPrec :: Int -> ClientDataHash -> ShowS
Show)
deriving newtype ([ClientDataHash] -> Encoding
[ClientDataHash] -> Value
ClientDataHash -> Encoding
ClientDataHash -> Value
(ClientDataHash -> Value)
-> (ClientDataHash -> Encoding)
-> ([ClientDataHash] -> Value)
-> ([ClientDataHash] -> Encoding)
-> ToJSON ClientDataHash
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [ClientDataHash] -> Encoding
$ctoEncodingList :: [ClientDataHash] -> Encoding
toJSONList :: [ClientDataHash] -> Value
$ctoJSONList :: [ClientDataHash] -> Value
toEncoding :: ClientDataHash -> Encoding
$ctoEncoding :: ClientDataHash -> Encoding
toJSON :: ClientDataHash -> Value
$ctoJSON :: ClientDataHash -> Value
ToJSON)
newtype Origin = Origin {Origin -> Text
unOrigin :: Text}
deriving (Origin -> Origin -> Bool
(Origin -> Origin -> Bool)
-> (Origin -> Origin -> Bool) -> Eq Origin
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Origin -> Origin -> Bool
$c/= :: Origin -> Origin -> Bool
== :: Origin -> Origin -> Bool
$c== :: Origin -> Origin -> Bool
Eq, Int -> Origin -> ShowS
[Origin] -> ShowS
Origin -> String
(Int -> Origin -> ShowS)
-> (Origin -> String) -> ([Origin] -> ShowS) -> Show Origin
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Origin] -> ShowS
$cshowList :: [Origin] -> ShowS
show :: Origin -> String
$cshow :: Origin -> String
showsPrec :: Int -> Origin -> ShowS
$cshowsPrec :: Int -> Origin -> ShowS
Show)
deriving newtype (String -> Origin
(String -> Origin) -> IsString Origin
forall a. (String -> a) -> IsString a
fromString :: String -> Origin
$cfromString :: String -> Origin
IsString, [Origin] -> Encoding
[Origin] -> Value
Origin -> Encoding
Origin -> Value
(Origin -> Value)
-> (Origin -> Encoding)
-> ([Origin] -> Value)
-> ([Origin] -> Encoding)
-> ToJSON Origin
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [Origin] -> Encoding
$ctoEncodingList :: [Origin] -> Encoding
toJSONList :: [Origin] -> Value
$ctoJSONList :: [Origin] -> Value
toEncoding :: Origin -> Encoding
$ctoEncoding :: Origin -> Encoding
toJSON :: Origin -> Value
$ctoJSON :: Origin -> Value
ToJSON)
newtype SignatureCounter = SignatureCounter {SignatureCounter -> Word32
unSignatureCounter :: Word32}
deriving (SignatureCounter -> SignatureCounter -> Bool
(SignatureCounter -> SignatureCounter -> Bool)
-> (SignatureCounter -> SignatureCounter -> Bool)
-> Eq SignatureCounter
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SignatureCounter -> SignatureCounter -> Bool
$c/= :: SignatureCounter -> SignatureCounter -> Bool
== :: SignatureCounter -> SignatureCounter -> Bool
$c== :: SignatureCounter -> SignatureCounter -> Bool
Eq, Int -> SignatureCounter -> ShowS
[SignatureCounter] -> ShowS
SignatureCounter -> String
(Int -> SignatureCounter -> ShowS)
-> (SignatureCounter -> String)
-> ([SignatureCounter] -> ShowS)
-> Show SignatureCounter
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SignatureCounter] -> ShowS
$cshowList :: [SignatureCounter] -> ShowS
show :: SignatureCounter -> String
$cshow :: SignatureCounter -> String
showsPrec :: Int -> SignatureCounter -> ShowS
$cshowsPrec :: Int -> SignatureCounter -> ShowS
Show)
deriving newtype (Integer -> SignatureCounter
SignatureCounter -> SignatureCounter
SignatureCounter -> SignatureCounter -> SignatureCounter
(SignatureCounter -> SignatureCounter -> SignatureCounter)
-> (SignatureCounter -> SignatureCounter -> SignatureCounter)
-> (SignatureCounter -> SignatureCounter -> SignatureCounter)
-> (SignatureCounter -> SignatureCounter)
-> (SignatureCounter -> SignatureCounter)
-> (SignatureCounter -> SignatureCounter)
-> (Integer -> SignatureCounter)
-> Num SignatureCounter
forall a.
(a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (Integer -> a)
-> Num a
fromInteger :: Integer -> SignatureCounter
$cfromInteger :: Integer -> SignatureCounter
signum :: SignatureCounter -> SignatureCounter
$csignum :: SignatureCounter -> SignatureCounter
abs :: SignatureCounter -> SignatureCounter
$cabs :: SignatureCounter -> SignatureCounter
negate :: SignatureCounter -> SignatureCounter
$cnegate :: SignatureCounter -> SignatureCounter
* :: SignatureCounter -> SignatureCounter -> SignatureCounter
$c* :: SignatureCounter -> SignatureCounter -> SignatureCounter
- :: SignatureCounter -> SignatureCounter -> SignatureCounter
$c- :: SignatureCounter -> SignatureCounter -> SignatureCounter
+ :: SignatureCounter -> SignatureCounter -> SignatureCounter
$c+ :: SignatureCounter -> SignatureCounter -> SignatureCounter
Num, Eq SignatureCounter
Eq SignatureCounter
-> (SignatureCounter -> SignatureCounter -> Ordering)
-> (SignatureCounter -> SignatureCounter -> Bool)
-> (SignatureCounter -> SignatureCounter -> Bool)
-> (SignatureCounter -> SignatureCounter -> Bool)
-> (SignatureCounter -> SignatureCounter -> Bool)
-> (SignatureCounter -> SignatureCounter -> SignatureCounter)
-> (SignatureCounter -> SignatureCounter -> SignatureCounter)
-> Ord SignatureCounter
SignatureCounter -> SignatureCounter -> Bool
SignatureCounter -> SignatureCounter -> Ordering
SignatureCounter -> SignatureCounter -> SignatureCounter
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 :: SignatureCounter -> SignatureCounter -> SignatureCounter
$cmin :: SignatureCounter -> SignatureCounter -> SignatureCounter
max :: SignatureCounter -> SignatureCounter -> SignatureCounter
$cmax :: SignatureCounter -> SignatureCounter -> SignatureCounter
>= :: SignatureCounter -> SignatureCounter -> Bool
$c>= :: SignatureCounter -> SignatureCounter -> Bool
> :: SignatureCounter -> SignatureCounter -> Bool
$c> :: SignatureCounter -> SignatureCounter -> Bool
<= :: SignatureCounter -> SignatureCounter -> Bool
$c<= :: SignatureCounter -> SignatureCounter -> Bool
< :: SignatureCounter -> SignatureCounter -> Bool
$c< :: SignatureCounter -> SignatureCounter -> Bool
compare :: SignatureCounter -> SignatureCounter -> Ordering
$ccompare :: SignatureCounter -> SignatureCounter -> Ordering
Ord, [SignatureCounter] -> Encoding
[SignatureCounter] -> Value
SignatureCounter -> Encoding
SignatureCounter -> Value
(SignatureCounter -> Value)
-> (SignatureCounter -> Encoding)
-> ([SignatureCounter] -> Value)
-> ([SignatureCounter] -> Encoding)
-> ToJSON SignatureCounter
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [SignatureCounter] -> Encoding
$ctoEncodingList :: [SignatureCounter] -> Encoding
toJSONList :: [SignatureCounter] -> Value
$ctoJSONList :: [SignatureCounter] -> Value
toEncoding :: SignatureCounter -> Encoding
$ctoEncoding :: SignatureCounter -> Encoding
toJSON :: SignatureCounter -> Value
$ctoJSON :: SignatureCounter -> Value
ToJSON)
newtype PublicKeyBytes = PublicKeyBytes {PublicKeyBytes -> ByteString
unPublicKeyBytes :: BS.ByteString}
deriving (PublicKeyBytes -> PublicKeyBytes -> Bool
(PublicKeyBytes -> PublicKeyBytes -> Bool)
-> (PublicKeyBytes -> PublicKeyBytes -> Bool) -> Eq PublicKeyBytes
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PublicKeyBytes -> PublicKeyBytes -> Bool
$c/= :: PublicKeyBytes -> PublicKeyBytes -> Bool
== :: PublicKeyBytes -> PublicKeyBytes -> Bool
$c== :: PublicKeyBytes -> PublicKeyBytes -> Bool
Eq, Int -> PublicKeyBytes -> ShowS
[PublicKeyBytes] -> ShowS
PublicKeyBytes -> String
(Int -> PublicKeyBytes -> ShowS)
-> (PublicKeyBytes -> String)
-> ([PublicKeyBytes] -> ShowS)
-> Show PublicKeyBytes
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PublicKeyBytes] -> ShowS
$cshowList :: [PublicKeyBytes] -> ShowS
show :: PublicKeyBytes -> String
$cshow :: PublicKeyBytes -> String
showsPrec :: Int -> PublicKeyBytes -> ShowS
$cshowsPrec :: Int -> PublicKeyBytes -> ShowS
Show)
deriving newtype ([PublicKeyBytes] -> Encoding
[PublicKeyBytes] -> Value
PublicKeyBytes -> Encoding
PublicKeyBytes -> Value
(PublicKeyBytes -> Value)
-> (PublicKeyBytes -> Encoding)
-> ([PublicKeyBytes] -> Value)
-> ([PublicKeyBytes] -> Encoding)
-> ToJSON PublicKeyBytes
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [PublicKeyBytes] -> Encoding
$ctoEncodingList :: [PublicKeyBytes] -> Encoding
toJSONList :: [PublicKeyBytes] -> Value
$ctoJSONList :: [PublicKeyBytes] -> Value
toEncoding :: PublicKeyBytes -> Encoding
$ctoEncoding :: PublicKeyBytes -> Encoding
toJSON :: PublicKeyBytes -> Value
$ctoJSON :: PublicKeyBytes -> Value
ToJSON)
data AuthenticationExtensionsClientInputs = AuthenticationExtensionsClientInputs
{
}
deriving (AuthenticationExtensionsClientInputs
-> AuthenticationExtensionsClientInputs -> Bool
(AuthenticationExtensionsClientInputs
-> AuthenticationExtensionsClientInputs -> Bool)
-> (AuthenticationExtensionsClientInputs
-> AuthenticationExtensionsClientInputs -> Bool)
-> Eq AuthenticationExtensionsClientInputs
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AuthenticationExtensionsClientInputs
-> AuthenticationExtensionsClientInputs -> Bool
$c/= :: AuthenticationExtensionsClientInputs
-> AuthenticationExtensionsClientInputs -> Bool
== :: AuthenticationExtensionsClientInputs
-> AuthenticationExtensionsClientInputs -> Bool
$c== :: AuthenticationExtensionsClientInputs
-> AuthenticationExtensionsClientInputs -> Bool
Eq, Int -> AuthenticationExtensionsClientInputs -> ShowS
[AuthenticationExtensionsClientInputs] -> ShowS
AuthenticationExtensionsClientInputs -> String
(Int -> AuthenticationExtensionsClientInputs -> ShowS)
-> (AuthenticationExtensionsClientInputs -> String)
-> ([AuthenticationExtensionsClientInputs] -> ShowS)
-> Show AuthenticationExtensionsClientInputs
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AuthenticationExtensionsClientInputs] -> ShowS
$cshowList :: [AuthenticationExtensionsClientInputs] -> ShowS
show :: AuthenticationExtensionsClientInputs -> String
$cshow :: AuthenticationExtensionsClientInputs -> String
showsPrec :: Int -> AuthenticationExtensionsClientInputs -> ShowS
$cshowsPrec :: Int -> AuthenticationExtensionsClientInputs -> ShowS
Show)
instance ToJSON AuthenticationExtensionsClientInputs where
toJSON :: AuthenticationExtensionsClientInputs -> Value
toJSON AuthenticationExtensionsClientInputs
_ = [Pair] -> Value
object []
data AuthenticationExtensionsClientOutputs = AuthenticationExtensionsClientOutputs
{
}
deriving (AuthenticationExtensionsClientOutputs
-> AuthenticationExtensionsClientOutputs -> Bool
(AuthenticationExtensionsClientOutputs
-> AuthenticationExtensionsClientOutputs -> Bool)
-> (AuthenticationExtensionsClientOutputs
-> AuthenticationExtensionsClientOutputs -> Bool)
-> Eq AuthenticationExtensionsClientOutputs
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AuthenticationExtensionsClientOutputs
-> AuthenticationExtensionsClientOutputs -> Bool
$c/= :: AuthenticationExtensionsClientOutputs
-> AuthenticationExtensionsClientOutputs -> Bool
== :: AuthenticationExtensionsClientOutputs
-> AuthenticationExtensionsClientOutputs -> Bool
$c== :: AuthenticationExtensionsClientOutputs
-> AuthenticationExtensionsClientOutputs -> Bool
Eq, Int -> AuthenticationExtensionsClientOutputs -> ShowS
[AuthenticationExtensionsClientOutputs] -> ShowS
AuthenticationExtensionsClientOutputs -> String
(Int -> AuthenticationExtensionsClientOutputs -> ShowS)
-> (AuthenticationExtensionsClientOutputs -> String)
-> ([AuthenticationExtensionsClientOutputs] -> ShowS)
-> Show AuthenticationExtensionsClientOutputs
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AuthenticationExtensionsClientOutputs] -> ShowS
$cshowList :: [AuthenticationExtensionsClientOutputs] -> ShowS
show :: AuthenticationExtensionsClientOutputs -> String
$cshow :: AuthenticationExtensionsClientOutputs -> String
showsPrec :: Int -> AuthenticationExtensionsClientOutputs -> ShowS
$cshowsPrec :: Int -> AuthenticationExtensionsClientOutputs -> ShowS
Show)
instance ToJSON AuthenticationExtensionsClientOutputs where
toJSON :: AuthenticationExtensionsClientOutputs -> Value
toJSON AuthenticationExtensionsClientOutputs
_ = [Pair] -> Value
object []
data AuthenticatorExtensionOutputs = AuthenticatorExtensionOutputs
{
}
deriving (AuthenticatorExtensionOutputs
-> AuthenticatorExtensionOutputs -> Bool
(AuthenticatorExtensionOutputs
-> AuthenticatorExtensionOutputs -> Bool)
-> (AuthenticatorExtensionOutputs
-> AuthenticatorExtensionOutputs -> Bool)
-> Eq AuthenticatorExtensionOutputs
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AuthenticatorExtensionOutputs
-> AuthenticatorExtensionOutputs -> Bool
$c/= :: AuthenticatorExtensionOutputs
-> AuthenticatorExtensionOutputs -> Bool
== :: AuthenticatorExtensionOutputs
-> AuthenticatorExtensionOutputs -> Bool
$c== :: AuthenticatorExtensionOutputs
-> AuthenticatorExtensionOutputs -> Bool
Eq, Int -> AuthenticatorExtensionOutputs -> ShowS
[AuthenticatorExtensionOutputs] -> ShowS
AuthenticatorExtensionOutputs -> String
(Int -> AuthenticatorExtensionOutputs -> ShowS)
-> (AuthenticatorExtensionOutputs -> String)
-> ([AuthenticatorExtensionOutputs] -> ShowS)
-> Show AuthenticatorExtensionOutputs
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AuthenticatorExtensionOutputs] -> ShowS
$cshowList :: [AuthenticatorExtensionOutputs] -> ShowS
show :: AuthenticatorExtensionOutputs -> String
$cshow :: AuthenticatorExtensionOutputs -> String
showsPrec :: Int -> AuthenticatorExtensionOutputs -> ShowS
$cshowsPrec :: Int -> AuthenticatorExtensionOutputs -> ShowS
Show)
instance ToJSON AuthenticatorExtensionOutputs where
toJSON :: AuthenticatorExtensionOutputs -> Value
toJSON AuthenticatorExtensionOutputs
_ = [Pair] -> Value
object []
data CredentialRpEntity = CredentialRpEntity
{
CredentialRpEntity -> Maybe RpId
creId :: Maybe RpId,
CredentialRpEntity -> RelyingPartyName
creName :: RelyingPartyName
}
deriving (CredentialRpEntity -> CredentialRpEntity -> Bool
(CredentialRpEntity -> CredentialRpEntity -> Bool)
-> (CredentialRpEntity -> CredentialRpEntity -> Bool)
-> Eq CredentialRpEntity
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CredentialRpEntity -> CredentialRpEntity -> Bool
$c/= :: CredentialRpEntity -> CredentialRpEntity -> Bool
== :: CredentialRpEntity -> CredentialRpEntity -> Bool
$c== :: CredentialRpEntity -> CredentialRpEntity -> Bool
Eq, Int -> CredentialRpEntity -> ShowS
[CredentialRpEntity] -> ShowS
CredentialRpEntity -> String
(Int -> CredentialRpEntity -> ShowS)
-> (CredentialRpEntity -> String)
-> ([CredentialRpEntity] -> ShowS)
-> Show CredentialRpEntity
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CredentialRpEntity] -> ShowS
$cshowList :: [CredentialRpEntity] -> ShowS
show :: CredentialRpEntity -> String
$cshow :: CredentialRpEntity -> String
showsPrec :: Int -> CredentialRpEntity -> ShowS
$cshowsPrec :: Int -> CredentialRpEntity -> ShowS
Show, (forall x. CredentialRpEntity -> Rep CredentialRpEntity x)
-> (forall x. Rep CredentialRpEntity x -> CredentialRpEntity)
-> Generic CredentialRpEntity
forall x. Rep CredentialRpEntity x -> CredentialRpEntity
forall x. CredentialRpEntity -> Rep CredentialRpEntity x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CredentialRpEntity x -> CredentialRpEntity
$cfrom :: forall x. CredentialRpEntity -> Rep CredentialRpEntity x
Generic, [CredentialRpEntity] -> Encoding
[CredentialRpEntity] -> Value
CredentialRpEntity -> Encoding
CredentialRpEntity -> Value
(CredentialRpEntity -> Value)
-> (CredentialRpEntity -> Encoding)
-> ([CredentialRpEntity] -> Value)
-> ([CredentialRpEntity] -> Encoding)
-> ToJSON CredentialRpEntity
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [CredentialRpEntity] -> Encoding
$ctoEncodingList :: [CredentialRpEntity] -> Encoding
toJSONList :: [CredentialRpEntity] -> Value
$ctoJSONList :: [CredentialRpEntity] -> Value
toEncoding :: CredentialRpEntity -> Encoding
$ctoEncoding :: CredentialRpEntity -> Encoding
toJSON :: CredentialRpEntity -> Value
$ctoJSON :: CredentialRpEntity -> Value
ToJSON)
data CredentialUserEntity = CredentialUserEntity
{
CredentialUserEntity -> UserHandle
cueId :: UserHandle,
CredentialUserEntity -> UserAccountDisplayName
cueDisplayName :: UserAccountDisplayName,
CredentialUserEntity -> UserAccountName
cueName :: UserAccountName
}
deriving (CredentialUserEntity -> CredentialUserEntity -> Bool
(CredentialUserEntity -> CredentialUserEntity -> Bool)
-> (CredentialUserEntity -> CredentialUserEntity -> Bool)
-> Eq CredentialUserEntity
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CredentialUserEntity -> CredentialUserEntity -> Bool
$c/= :: CredentialUserEntity -> CredentialUserEntity -> Bool
== :: CredentialUserEntity -> CredentialUserEntity -> Bool
$c== :: CredentialUserEntity -> CredentialUserEntity -> Bool
Eq, Int -> CredentialUserEntity -> ShowS
[CredentialUserEntity] -> ShowS
CredentialUserEntity -> String
(Int -> CredentialUserEntity -> ShowS)
-> (CredentialUserEntity -> String)
-> ([CredentialUserEntity] -> ShowS)
-> Show CredentialUserEntity
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CredentialUserEntity] -> ShowS
$cshowList :: [CredentialUserEntity] -> ShowS
show :: CredentialUserEntity -> String
$cshow :: CredentialUserEntity -> String
showsPrec :: Int -> CredentialUserEntity -> ShowS
$cshowsPrec :: Int -> CredentialUserEntity -> ShowS
Show, (forall x. CredentialUserEntity -> Rep CredentialUserEntity x)
-> (forall x. Rep CredentialUserEntity x -> CredentialUserEntity)
-> Generic CredentialUserEntity
forall x. Rep CredentialUserEntity x -> CredentialUserEntity
forall x. CredentialUserEntity -> Rep CredentialUserEntity x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CredentialUserEntity x -> CredentialUserEntity
$cfrom :: forall x. CredentialUserEntity -> Rep CredentialUserEntity x
Generic, [CredentialUserEntity] -> Encoding
[CredentialUserEntity] -> Value
CredentialUserEntity -> Encoding
CredentialUserEntity -> Value
(CredentialUserEntity -> Value)
-> (CredentialUserEntity -> Encoding)
-> ([CredentialUserEntity] -> Value)
-> ([CredentialUserEntity] -> Encoding)
-> ToJSON CredentialUserEntity
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [CredentialUserEntity] -> Encoding
$ctoEncodingList :: [CredentialUserEntity] -> Encoding
toJSONList :: [CredentialUserEntity] -> Value
$ctoJSONList :: [CredentialUserEntity] -> Value
toEncoding :: CredentialUserEntity -> Encoding
$ctoEncoding :: CredentialUserEntity -> Encoding
toJSON :: CredentialUserEntity -> Value
$ctoJSON :: CredentialUserEntity -> Value
ToJSON)
data CredentialParameters = CredentialParameters
{
CredentialParameters -> CredentialType
cpTyp :: CredentialType,
CredentialParameters -> CoseSignAlg
cpAlg :: Cose.CoseSignAlg
}
deriving (CredentialParameters -> CredentialParameters -> Bool
(CredentialParameters -> CredentialParameters -> Bool)
-> (CredentialParameters -> CredentialParameters -> Bool)
-> Eq CredentialParameters
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CredentialParameters -> CredentialParameters -> Bool
$c/= :: CredentialParameters -> CredentialParameters -> Bool
== :: CredentialParameters -> CredentialParameters -> Bool
$c== :: CredentialParameters -> CredentialParameters -> Bool
Eq, Int -> CredentialParameters -> ShowS
[CredentialParameters] -> ShowS
CredentialParameters -> String
(Int -> CredentialParameters -> ShowS)
-> (CredentialParameters -> String)
-> ([CredentialParameters] -> ShowS)
-> Show CredentialParameters
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CredentialParameters] -> ShowS
$cshowList :: [CredentialParameters] -> ShowS
show :: CredentialParameters -> String
$cshow :: CredentialParameters -> String
showsPrec :: Int -> CredentialParameters -> ShowS
$cshowsPrec :: Int -> CredentialParameters -> ShowS
Show, (forall x. CredentialParameters -> Rep CredentialParameters x)
-> (forall x. Rep CredentialParameters x -> CredentialParameters)
-> Generic CredentialParameters
forall x. Rep CredentialParameters x -> CredentialParameters
forall x. CredentialParameters -> Rep CredentialParameters x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CredentialParameters x -> CredentialParameters
$cfrom :: forall x. CredentialParameters -> Rep CredentialParameters x
Generic, [CredentialParameters] -> Encoding
[CredentialParameters] -> Value
CredentialParameters -> Encoding
CredentialParameters -> Value
(CredentialParameters -> Value)
-> (CredentialParameters -> Encoding)
-> ([CredentialParameters] -> Value)
-> ([CredentialParameters] -> Encoding)
-> ToJSON CredentialParameters
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [CredentialParameters] -> Encoding
$ctoEncodingList :: [CredentialParameters] -> Encoding
toJSONList :: [CredentialParameters] -> Value
$ctoJSONList :: [CredentialParameters] -> Value
toEncoding :: CredentialParameters -> Encoding
$ctoEncoding :: CredentialParameters -> Encoding
toJSON :: CredentialParameters -> Value
$ctoJSON :: CredentialParameters -> Value
ToJSON)
data CredentialDescriptor = CredentialDescriptor
{
CredentialDescriptor -> CredentialType
cdTyp :: CredentialType,
CredentialDescriptor -> CredentialId
cdId :: CredentialId,
CredentialDescriptor -> Maybe [AuthenticatorTransport]
cdTransports :: Maybe [AuthenticatorTransport]
}
deriving (CredentialDescriptor -> CredentialDescriptor -> Bool
(CredentialDescriptor -> CredentialDescriptor -> Bool)
-> (CredentialDescriptor -> CredentialDescriptor -> Bool)
-> Eq CredentialDescriptor
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CredentialDescriptor -> CredentialDescriptor -> Bool
$c/= :: CredentialDescriptor -> CredentialDescriptor -> Bool
== :: CredentialDescriptor -> CredentialDescriptor -> Bool
$c== :: CredentialDescriptor -> CredentialDescriptor -> Bool
Eq, Int -> CredentialDescriptor -> ShowS
[CredentialDescriptor] -> ShowS
CredentialDescriptor -> String
(Int -> CredentialDescriptor -> ShowS)
-> (CredentialDescriptor -> String)
-> ([CredentialDescriptor] -> ShowS)
-> Show CredentialDescriptor
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CredentialDescriptor] -> ShowS
$cshowList :: [CredentialDescriptor] -> ShowS
show :: CredentialDescriptor -> String
$cshow :: CredentialDescriptor -> String
showsPrec :: Int -> CredentialDescriptor -> ShowS
$cshowsPrec :: Int -> CredentialDescriptor -> ShowS
Show, (forall x. CredentialDescriptor -> Rep CredentialDescriptor x)
-> (forall x. Rep CredentialDescriptor x -> CredentialDescriptor)
-> Generic CredentialDescriptor
forall x. Rep CredentialDescriptor x -> CredentialDescriptor
forall x. CredentialDescriptor -> Rep CredentialDescriptor x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CredentialDescriptor x -> CredentialDescriptor
$cfrom :: forall x. CredentialDescriptor -> Rep CredentialDescriptor x
Generic, [CredentialDescriptor] -> Encoding
[CredentialDescriptor] -> Value
CredentialDescriptor -> Encoding
CredentialDescriptor -> Value
(CredentialDescriptor -> Value)
-> (CredentialDescriptor -> Encoding)
-> ([CredentialDescriptor] -> Value)
-> ([CredentialDescriptor] -> Encoding)
-> ToJSON CredentialDescriptor
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [CredentialDescriptor] -> Encoding
$ctoEncodingList :: [CredentialDescriptor] -> Encoding
toJSONList :: [CredentialDescriptor] -> Value
$ctoJSONList :: [CredentialDescriptor] -> Value
toEncoding :: CredentialDescriptor -> Encoding
$ctoEncoding :: CredentialDescriptor -> Encoding
toJSON :: CredentialDescriptor -> Value
$ctoJSON :: CredentialDescriptor -> Value
ToJSON)
data AuthenticatorSelectionCriteria = AuthenticatorSelectionCriteria
{
AuthenticatorSelectionCriteria -> Maybe AuthenticatorAttachment
ascAuthenticatorAttachment :: Maybe AuthenticatorAttachment,
AuthenticatorSelectionCriteria -> ResidentKeyRequirement
ascResidentKey :: ResidentKeyRequirement,
AuthenticatorSelectionCriteria -> UserVerificationRequirement
ascUserVerification :: UserVerificationRequirement
}
deriving (AuthenticatorSelectionCriteria
-> AuthenticatorSelectionCriteria -> Bool
(AuthenticatorSelectionCriteria
-> AuthenticatorSelectionCriteria -> Bool)
-> (AuthenticatorSelectionCriteria
-> AuthenticatorSelectionCriteria -> Bool)
-> Eq AuthenticatorSelectionCriteria
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AuthenticatorSelectionCriteria
-> AuthenticatorSelectionCriteria -> Bool
$c/= :: AuthenticatorSelectionCriteria
-> AuthenticatorSelectionCriteria -> Bool
== :: AuthenticatorSelectionCriteria
-> AuthenticatorSelectionCriteria -> Bool
$c== :: AuthenticatorSelectionCriteria
-> AuthenticatorSelectionCriteria -> Bool
Eq, Int -> AuthenticatorSelectionCriteria -> ShowS
[AuthenticatorSelectionCriteria] -> ShowS
AuthenticatorSelectionCriteria -> String
(Int -> AuthenticatorSelectionCriteria -> ShowS)
-> (AuthenticatorSelectionCriteria -> String)
-> ([AuthenticatorSelectionCriteria] -> ShowS)
-> Show AuthenticatorSelectionCriteria
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AuthenticatorSelectionCriteria] -> ShowS
$cshowList :: [AuthenticatorSelectionCriteria] -> ShowS
show :: AuthenticatorSelectionCriteria -> String
$cshow :: AuthenticatorSelectionCriteria -> String
showsPrec :: Int -> AuthenticatorSelectionCriteria -> ShowS
$cshowsPrec :: Int -> AuthenticatorSelectionCriteria -> ShowS
Show, (forall x.
AuthenticatorSelectionCriteria
-> Rep AuthenticatorSelectionCriteria x)
-> (forall x.
Rep AuthenticatorSelectionCriteria x
-> AuthenticatorSelectionCriteria)
-> Generic AuthenticatorSelectionCriteria
forall x.
Rep AuthenticatorSelectionCriteria x
-> AuthenticatorSelectionCriteria
forall x.
AuthenticatorSelectionCriteria
-> Rep AuthenticatorSelectionCriteria x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AuthenticatorSelectionCriteria x
-> AuthenticatorSelectionCriteria
$cfrom :: forall x.
AuthenticatorSelectionCriteria
-> Rep AuthenticatorSelectionCriteria x
Generic, [AuthenticatorSelectionCriteria] -> Encoding
[AuthenticatorSelectionCriteria] -> Value
AuthenticatorSelectionCriteria -> Encoding
AuthenticatorSelectionCriteria -> Value
(AuthenticatorSelectionCriteria -> Value)
-> (AuthenticatorSelectionCriteria -> Encoding)
-> ([AuthenticatorSelectionCriteria] -> Value)
-> ([AuthenticatorSelectionCriteria] -> Encoding)
-> ToJSON AuthenticatorSelectionCriteria
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [AuthenticatorSelectionCriteria] -> Encoding
$ctoEncodingList :: [AuthenticatorSelectionCriteria] -> Encoding
toJSONList :: [AuthenticatorSelectionCriteria] -> Value
$ctoJSONList :: [AuthenticatorSelectionCriteria] -> Value
toEncoding :: AuthenticatorSelectionCriteria -> Encoding
$ctoEncoding :: AuthenticatorSelectionCriteria -> Encoding
toJSON :: AuthenticatorSelectionCriteria -> Value
$ctoJSON :: AuthenticatorSelectionCriteria -> Value
ToJSON)
data AuthenticatorDataFlags = AuthenticatorDataFlags
{
AuthenticatorDataFlags -> Bool
adfUserPresent :: Bool,
AuthenticatorDataFlags -> Bool
adfUserVerified :: Bool
}
deriving (AuthenticatorDataFlags -> AuthenticatorDataFlags -> Bool
(AuthenticatorDataFlags -> AuthenticatorDataFlags -> Bool)
-> (AuthenticatorDataFlags -> AuthenticatorDataFlags -> Bool)
-> Eq AuthenticatorDataFlags
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AuthenticatorDataFlags -> AuthenticatorDataFlags -> Bool
$c/= :: AuthenticatorDataFlags -> AuthenticatorDataFlags -> Bool
== :: AuthenticatorDataFlags -> AuthenticatorDataFlags -> Bool
$c== :: AuthenticatorDataFlags -> AuthenticatorDataFlags -> Bool
Eq, Int -> AuthenticatorDataFlags -> ShowS
[AuthenticatorDataFlags] -> ShowS
AuthenticatorDataFlags -> String
(Int -> AuthenticatorDataFlags -> ShowS)
-> (AuthenticatorDataFlags -> String)
-> ([AuthenticatorDataFlags] -> ShowS)
-> Show AuthenticatorDataFlags
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AuthenticatorDataFlags] -> ShowS
$cshowList :: [AuthenticatorDataFlags] -> ShowS
show :: AuthenticatorDataFlags -> String
$cshow :: AuthenticatorDataFlags -> String
showsPrec :: Int -> AuthenticatorDataFlags -> ShowS
$cshowsPrec :: Int -> AuthenticatorDataFlags -> ShowS
Show, (forall x. AuthenticatorDataFlags -> Rep AuthenticatorDataFlags x)
-> (forall x.
Rep AuthenticatorDataFlags x -> AuthenticatorDataFlags)
-> Generic AuthenticatorDataFlags
forall x. Rep AuthenticatorDataFlags x -> AuthenticatorDataFlags
forall x. AuthenticatorDataFlags -> Rep AuthenticatorDataFlags x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AuthenticatorDataFlags x -> AuthenticatorDataFlags
$cfrom :: forall x. AuthenticatorDataFlags -> Rep AuthenticatorDataFlags x
Generic, [AuthenticatorDataFlags] -> Encoding
[AuthenticatorDataFlags] -> Value
AuthenticatorDataFlags -> Encoding
AuthenticatorDataFlags -> Value
(AuthenticatorDataFlags -> Value)
-> (AuthenticatorDataFlags -> Encoding)
-> ([AuthenticatorDataFlags] -> Value)
-> ([AuthenticatorDataFlags] -> Encoding)
-> ToJSON AuthenticatorDataFlags
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [AuthenticatorDataFlags] -> Encoding
$ctoEncodingList :: [AuthenticatorDataFlags] -> Encoding
toJSONList :: [AuthenticatorDataFlags] -> Value
$ctoJSONList :: [AuthenticatorDataFlags] -> Value
toEncoding :: AuthenticatorDataFlags -> Encoding
$ctoEncoding :: AuthenticatorDataFlags -> Encoding
toJSON :: AuthenticatorDataFlags -> Value
$ctoJSON :: AuthenticatorDataFlags -> Value
ToJSON)
data CredentialOptions (c :: CeremonyKind) where
CredentialOptionsRegistration ::
{
CredentialOptions 'Registration -> CredentialRpEntity
corRp :: CredentialRpEntity,
CredentialOptions 'Registration -> CredentialUserEntity
corUser :: CredentialUserEntity,
CredentialOptions 'Registration -> Challenge
corChallenge :: Challenge,
CredentialOptions 'Registration -> [CredentialParameters]
corPubKeyCredParams :: [CredentialParameters],
CredentialOptions 'Registration -> Maybe Timeout
corTimeout :: Maybe Timeout,
CredentialOptions 'Registration -> [CredentialDescriptor]
corExcludeCredentials :: [CredentialDescriptor],
CredentialOptions 'Registration
-> Maybe AuthenticatorSelectionCriteria
corAuthenticatorSelection :: Maybe AuthenticatorSelectionCriteria,
CredentialOptions 'Registration -> AttestationConveyancePreference
corAttestation :: AttestationConveyancePreference,
CredentialOptions 'Registration
-> Maybe AuthenticationExtensionsClientInputs
corExtensions :: Maybe AuthenticationExtensionsClientInputs
} ->
CredentialOptions 'Registration
CredentialOptionsAuthentication ::
{
CredentialOptions 'Authentication -> Challenge
coaChallenge :: Challenge,
CredentialOptions 'Authentication -> Maybe Timeout
coaTimeout :: Maybe Timeout,
CredentialOptions 'Authentication -> Maybe RpId
coaRpId :: Maybe RpId,
CredentialOptions 'Authentication -> [CredentialDescriptor]
coaAllowCredentials :: [CredentialDescriptor],
CredentialOptions 'Authentication -> UserVerificationRequirement
coaUserVerification :: UserVerificationRequirement,
CredentialOptions 'Authentication
-> Maybe AuthenticationExtensionsClientInputs
coaExtensions :: Maybe AuthenticationExtensionsClientInputs
} ->
CredentialOptions 'Authentication
deriving instance Eq (CredentialOptions c)
deriving instance Show (CredentialOptions c)
instance ToJSON (CredentialOptions c) where
toJSON :: CredentialOptions c -> Value
toJSON CredentialOptionsRegistration {[CredentialDescriptor]
[CredentialParameters]
Maybe AuthenticatorSelectionCriteria
Maybe AuthenticationExtensionsClientInputs
Maybe Timeout
CredentialUserEntity
CredentialRpEntity
Challenge
AttestationConveyancePreference
corExtensions :: Maybe AuthenticationExtensionsClientInputs
corAttestation :: AttestationConveyancePreference
corAuthenticatorSelection :: Maybe AuthenticatorSelectionCriteria
corExcludeCredentials :: [CredentialDescriptor]
corTimeout :: Maybe Timeout
corPubKeyCredParams :: [CredentialParameters]
corChallenge :: Challenge
corUser :: CredentialUserEntity
corRp :: CredentialRpEntity
corExtensions :: CredentialOptions 'Registration
-> Maybe AuthenticationExtensionsClientInputs
corAttestation :: CredentialOptions 'Registration -> AttestationConveyancePreference
corAuthenticatorSelection :: CredentialOptions 'Registration
-> Maybe AuthenticatorSelectionCriteria
corExcludeCredentials :: CredentialOptions 'Registration -> [CredentialDescriptor]
corTimeout :: CredentialOptions 'Registration -> Maybe Timeout
corPubKeyCredParams :: CredentialOptions 'Registration -> [CredentialParameters]
corChallenge :: CredentialOptions 'Registration -> Challenge
corUser :: CredentialOptions 'Registration -> CredentialUserEntity
corRp :: CredentialOptions 'Registration -> CredentialRpEntity
..} =
[Pair] -> Value
object
[ Key
"tag" Key -> Value -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text -> Value
String Text
"CredentialOptionsRegistration",
Key
"corRp" Key -> CredentialRpEntity -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= CredentialRpEntity
corRp,
Key
"corUser" Key -> CredentialUserEntity -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= CredentialUserEntity
corUser,
Key
"corChallenge" Key -> Challenge -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Challenge
corChallenge,
Key
"corPubKeyCredParams" Key -> [CredentialParameters] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= [CredentialParameters]
corPubKeyCredParams,
Key
"corTimeout" Key -> Maybe Timeout -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Timeout
corTimeout,
Key
"corExcludeCredentials" Key -> [CredentialDescriptor] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= [CredentialDescriptor]
corExcludeCredentials,
Key
"corAuthenticatorSelection" Key -> Maybe AuthenticatorSelectionCriteria -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe AuthenticatorSelectionCriteria
corAuthenticatorSelection,
Key
"corAttestation" Key -> AttestationConveyancePreference -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= AttestationConveyancePreference
corAttestation,
Key
"corExtensions" Key -> Maybe AuthenticationExtensionsClientInputs -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe AuthenticationExtensionsClientInputs
corExtensions
]
toJSON CredentialOptionsAuthentication {[CredentialDescriptor]
Maybe AuthenticationExtensionsClientInputs
Maybe Timeout
Maybe RpId
Challenge
UserVerificationRequirement
coaExtensions :: Maybe AuthenticationExtensionsClientInputs
coaUserVerification :: UserVerificationRequirement
coaAllowCredentials :: [CredentialDescriptor]
coaRpId :: Maybe RpId
coaTimeout :: Maybe Timeout
coaChallenge :: Challenge
coaExtensions :: CredentialOptions 'Authentication
-> Maybe AuthenticationExtensionsClientInputs
coaUserVerification :: CredentialOptions 'Authentication -> UserVerificationRequirement
coaAllowCredentials :: CredentialOptions 'Authentication -> [CredentialDescriptor]
coaRpId :: CredentialOptions 'Authentication -> Maybe RpId
coaTimeout :: CredentialOptions 'Authentication -> Maybe Timeout
coaChallenge :: CredentialOptions 'Authentication -> Challenge
..} =
[Pair] -> Value
object
[ Key
"tag" Key -> Value -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text -> Value
String Text
"CredentialOptionsAuthentication",
Key
"coaChallenge" Key -> Challenge -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Challenge
coaChallenge,
Key
"coaTimeout" Key -> Maybe Timeout -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Timeout
coaTimeout,
Key
"coaRpId" Key -> Maybe RpId -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe RpId
coaRpId,
Key
"coaAllowCredentials" Key -> [CredentialDescriptor] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= [CredentialDescriptor]
coaAllowCredentials,
Key
"coaUserVerification" Key -> UserVerificationRequirement -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= UserVerificationRequirement
coaUserVerification,
Key
"coaExtensions" Key -> Maybe AuthenticationExtensionsClientInputs -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe AuthenticationExtensionsClientInputs
coaExtensions
]
data CollectedClientData (c :: CeremonyKind) raw = CollectedClientData
{
forall (c :: CeremonyKind) (raw :: Bool).
CollectedClientData c raw -> Challenge
ccdChallenge :: Challenge,
forall (c :: CeremonyKind) (raw :: Bool).
CollectedClientData c raw -> Origin
ccdOrigin :: Origin,
forall (c :: CeremonyKind) (raw :: Bool).
CollectedClientData c raw -> Maybe Bool
ccdCrossOrigin :: Maybe Bool,
forall (c :: CeremonyKind) (raw :: Bool).
CollectedClientData c raw -> RawField raw
ccdRawData :: RawField raw
}
deriving (CollectedClientData c raw -> CollectedClientData c raw -> Bool
(CollectedClientData c raw -> CollectedClientData c raw -> Bool)
-> (CollectedClientData c raw -> CollectedClientData c raw -> Bool)
-> Eq (CollectedClientData c raw)
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
forall (c :: CeremonyKind) (raw :: Bool).
CollectedClientData c raw -> CollectedClientData c raw -> Bool
/= :: CollectedClientData c raw -> CollectedClientData c raw -> Bool
$c/= :: forall (c :: CeremonyKind) (raw :: Bool).
CollectedClientData c raw -> CollectedClientData c raw -> Bool
== :: CollectedClientData c raw -> CollectedClientData c raw -> Bool
$c== :: forall (c :: CeremonyKind) (raw :: Bool).
CollectedClientData c raw -> CollectedClientData c raw -> Bool
Eq, Int -> CollectedClientData c raw -> ShowS
[CollectedClientData c raw] -> ShowS
CollectedClientData c raw -> String
(Int -> CollectedClientData c raw -> ShowS)
-> (CollectedClientData c raw -> String)
-> ([CollectedClientData c raw] -> ShowS)
-> Show (CollectedClientData c raw)
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
forall (c :: CeremonyKind) (raw :: Bool).
Int -> CollectedClientData c raw -> ShowS
forall (c :: CeremonyKind) (raw :: Bool).
[CollectedClientData c raw] -> ShowS
forall (c :: CeremonyKind) (raw :: Bool).
CollectedClientData c raw -> String
showList :: [CollectedClientData c raw] -> ShowS
$cshowList :: forall (c :: CeremonyKind) (raw :: Bool).
[CollectedClientData c raw] -> ShowS
show :: CollectedClientData c raw -> String
$cshow :: forall (c :: CeremonyKind) (raw :: Bool).
CollectedClientData c raw -> String
showsPrec :: Int -> CollectedClientData c raw -> ShowS
$cshowsPrec :: forall (c :: CeremonyKind) (raw :: Bool).
Int -> CollectedClientData c raw -> ShowS
Show)
instance SingI c => ToJSON (CollectedClientData (c :: CeremonyKind) raw) where
toJSON :: CollectedClientData c raw -> Value
toJSON CollectedClientData {Maybe Bool
Origin
Challenge
RawField raw
ccdRawData :: RawField raw
ccdCrossOrigin :: Maybe Bool
ccdOrigin :: Origin
ccdChallenge :: Challenge
ccdRawData :: forall (c :: CeremonyKind) (raw :: Bool).
CollectedClientData c raw -> RawField raw
ccdCrossOrigin :: forall (c :: CeremonyKind) (raw :: Bool).
CollectedClientData c raw -> Maybe Bool
ccdOrigin :: forall (c :: CeremonyKind) (raw :: Bool).
CollectedClientData c raw -> Origin
ccdChallenge :: forall (c :: CeremonyKind) (raw :: Bool).
CollectedClientData c raw -> Challenge
..} =
[Pair] -> Value
object
[ Key
"webauthnKind" Key -> SCeremonyKind c -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= forall {k} (a :: k). SingI a => Sing a
forall (a :: CeremonyKind). SingI a => Sing a
sing @c,
Key
"ccdChallenge" Key -> Challenge -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Challenge
ccdChallenge,
Key
"ccdOrigin" Key -> Origin -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Origin
ccdOrigin,
Key
"ccdCrossOrigin" Key -> Maybe Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
ccdCrossOrigin,
Key
"ccdRawData" Key -> RawField raw -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= RawField raw
ccdRawData
]
data AttestedCredentialData (c :: CeremonyKind) raw where
AttestedCredentialData ::
{
forall (raw :: Bool).
AttestedCredentialData 'Registration raw -> AAGUID
acdAaguid :: AAGUID,
forall (raw :: Bool).
AttestedCredentialData 'Registration raw -> CredentialId
acdCredentialId :: CredentialId,
forall (raw :: Bool).
AttestedCredentialData 'Registration raw -> CosePublicKey
acdCredentialPublicKey :: Cose.CosePublicKey,
forall (raw :: Bool).
AttestedCredentialData 'Registration raw -> RawField raw
acdCredentialPublicKeyBytes :: RawField raw
} ->
AttestedCredentialData 'Registration raw
NoAttestedCredentialData ::
AttestedCredentialData 'Authentication raw
deriving instance Eq (AttestedCredentialData c raw)
deriving instance Show (AttestedCredentialData c raw)
instance ToJSON (AttestedCredentialData c raw) where
toJSON :: AttestedCredentialData c raw -> Value
toJSON AttestedCredentialData {CosePublicKey
AAGUID
CredentialId
RawField raw
acdCredentialPublicKeyBytes :: RawField raw
acdCredentialPublicKey :: CosePublicKey
acdCredentialId :: CredentialId
acdAaguid :: AAGUID
acdCredentialPublicKeyBytes :: forall (raw :: Bool).
AttestedCredentialData 'Registration raw -> RawField raw
acdCredentialPublicKey :: forall (raw :: Bool).
AttestedCredentialData 'Registration raw -> CosePublicKey
acdCredentialId :: forall (raw :: Bool).
AttestedCredentialData 'Registration raw -> CredentialId
acdAaguid :: forall (raw :: Bool).
AttestedCredentialData 'Registration raw -> AAGUID
..} =
[Pair] -> Value
object
[ Key
"acdAaguid" Key -> AAGUID -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= AAGUID
acdAaguid,
Key
"acdCredentialId" Key -> CredentialId -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= CredentialId
acdCredentialId,
Key
"acdCredentialPublicKey" Key -> CosePublicKey -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= CosePublicKey
acdCredentialPublicKey,
Key
"acdCredentialPublicKeyBytes" Key -> RawField raw -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= RawField raw
acdCredentialPublicKeyBytes
]
toJSON NoAttestedCredentialData {} = Value
Null
data AuthenticatorData (c :: CeremonyKind) raw = AuthenticatorData
{
forall (c :: CeremonyKind) (raw :: Bool).
AuthenticatorData c raw -> RpIdHash
adRpIdHash :: RpIdHash,
forall (c :: CeremonyKind) (raw :: Bool).
AuthenticatorData c raw -> AuthenticatorDataFlags
adFlags :: AuthenticatorDataFlags,
forall (c :: CeremonyKind) (raw :: Bool).
AuthenticatorData c raw -> SignatureCounter
adSignCount :: SignatureCounter,
forall (c :: CeremonyKind) (raw :: Bool).
AuthenticatorData c raw -> AttestedCredentialData c raw
adAttestedCredentialData :: AttestedCredentialData c raw,
forall (c :: CeremonyKind) (raw :: Bool).
AuthenticatorData c raw -> Maybe AuthenticatorExtensionOutputs
adExtensions :: Maybe AuthenticatorExtensionOutputs,
forall (c :: CeremonyKind) (raw :: Bool).
AuthenticatorData c raw -> RawField raw
adRawData :: RawField raw
}
deriving (AuthenticatorData c raw -> AuthenticatorData c raw -> Bool
(AuthenticatorData c raw -> AuthenticatorData c raw -> Bool)
-> (AuthenticatorData c raw -> AuthenticatorData c raw -> Bool)
-> Eq (AuthenticatorData c raw)
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
forall (c :: CeremonyKind) (raw :: Bool).
AuthenticatorData c raw -> AuthenticatorData c raw -> Bool
/= :: AuthenticatorData c raw -> AuthenticatorData c raw -> Bool
$c/= :: forall (c :: CeremonyKind) (raw :: Bool).
AuthenticatorData c raw -> AuthenticatorData c raw -> Bool
== :: AuthenticatorData c raw -> AuthenticatorData c raw -> Bool
$c== :: forall (c :: CeremonyKind) (raw :: Bool).
AuthenticatorData c raw -> AuthenticatorData c raw -> Bool
Eq, Int -> AuthenticatorData c raw -> ShowS
[AuthenticatorData c raw] -> ShowS
AuthenticatorData c raw -> String
(Int -> AuthenticatorData c raw -> ShowS)
-> (AuthenticatorData c raw -> String)
-> ([AuthenticatorData c raw] -> ShowS)
-> Show (AuthenticatorData c raw)
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
forall (c :: CeremonyKind) (raw :: Bool).
Int -> AuthenticatorData c raw -> ShowS
forall (c :: CeremonyKind) (raw :: Bool).
[AuthenticatorData c raw] -> ShowS
forall (c :: CeremonyKind) (raw :: Bool).
AuthenticatorData c raw -> String
showList :: [AuthenticatorData c raw] -> ShowS
$cshowList :: forall (c :: CeremonyKind) (raw :: Bool).
[AuthenticatorData c raw] -> ShowS
show :: AuthenticatorData c raw -> String
$cshow :: forall (c :: CeremonyKind) (raw :: Bool).
AuthenticatorData c raw -> String
showsPrec :: Int -> AuthenticatorData c raw -> ShowS
$cshowsPrec :: forall (c :: CeremonyKind) (raw :: Bool).
Int -> AuthenticatorData c raw -> ShowS
Show, (forall x.
AuthenticatorData c raw -> Rep (AuthenticatorData c raw) x)
-> (forall x.
Rep (AuthenticatorData c raw) x -> AuthenticatorData c raw)
-> Generic (AuthenticatorData c raw)
forall x.
Rep (AuthenticatorData c raw) x -> AuthenticatorData c raw
forall x.
AuthenticatorData c raw -> Rep (AuthenticatorData c raw) x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
forall (c :: CeremonyKind) (raw :: Bool) x.
Rep (AuthenticatorData c raw) x -> AuthenticatorData c raw
forall (c :: CeremonyKind) (raw :: Bool) x.
AuthenticatorData c raw -> Rep (AuthenticatorData c raw) x
$cto :: forall (c :: CeremonyKind) (raw :: Bool) x.
Rep (AuthenticatorData c raw) x -> AuthenticatorData c raw
$cfrom :: forall (c :: CeremonyKind) (raw :: Bool) x.
AuthenticatorData c raw -> Rep (AuthenticatorData c raw) x
Generic, [AuthenticatorData c raw] -> Encoding
[AuthenticatorData c raw] -> Value
AuthenticatorData c raw -> Encoding
AuthenticatorData c raw -> Value
(AuthenticatorData c raw -> Value)
-> (AuthenticatorData c raw -> Encoding)
-> ([AuthenticatorData c raw] -> Value)
-> ([AuthenticatorData c raw] -> Encoding)
-> ToJSON (AuthenticatorData c raw)
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
forall (c :: CeremonyKind) (raw :: Bool).
[AuthenticatorData c raw] -> Encoding
forall (c :: CeremonyKind) (raw :: Bool).
[AuthenticatorData c raw] -> Value
forall (c :: CeremonyKind) (raw :: Bool).
AuthenticatorData c raw -> Encoding
forall (c :: CeremonyKind) (raw :: Bool).
AuthenticatorData c raw -> Value
toEncodingList :: [AuthenticatorData c raw] -> Encoding
$ctoEncodingList :: forall (c :: CeremonyKind) (raw :: Bool).
[AuthenticatorData c raw] -> Encoding
toJSONList :: [AuthenticatorData c raw] -> Value
$ctoJSONList :: forall (c :: CeremonyKind) (raw :: Bool).
[AuthenticatorData c raw] -> Value
toEncoding :: AuthenticatorData c raw -> Encoding
$ctoEncoding :: forall (c :: CeremonyKind) (raw :: Bool).
AuthenticatorData c raw -> Encoding
toJSON :: AuthenticatorData c raw -> Value
$ctoJSON :: forall (c :: CeremonyKind) (raw :: Bool).
AuthenticatorData c raw -> Value
ToJSON)
data SomeAttestationType = forall k. SomeAttestationType (AttestationType k)
class
( Eq (AttStmt a),
Show (AttStmt a),
ToJSON (AttStmt a),
Typeable a,
Show a,
Exception (AttStmtVerificationError a)
) =>
AttestationStatementFormat a
where
type AttStmt a :: Type
asfIdentifier :: a -> Text
type AttStmtVerificationError a :: Type
asfVerify ::
a ->
HG.DateTime ->
AttStmt a ->
AuthenticatorData 'Registration 'True ->
ClientDataHash ->
Validation (NonEmpty (AttStmtVerificationError a)) SomeAttestationType
asfTrustAnchors ::
a ->
VerifiableAttestationType ->
X509.CertificateStore
asfDecode ::
a ->
HashMap Text CBOR.Term ->
Either Text (AttStmt a)
asfEncode ::
a ->
AttStmt a ->
CBOR.Term
data SomeAttestationStatementFormat
= forall a.
AttestationStatementFormat a =>
SomeAttestationStatementFormat a
newtype SupportedAttestationStatementFormats
=
SupportedAttestationStatementFormats (HashMap Text SomeAttestationStatementFormat)
deriving newtype (NonEmpty SupportedAttestationStatementFormats
-> SupportedAttestationStatementFormats
SupportedAttestationStatementFormats
-> SupportedAttestationStatementFormats
-> SupportedAttestationStatementFormats
(SupportedAttestationStatementFormats
-> SupportedAttestationStatementFormats
-> SupportedAttestationStatementFormats)
-> (NonEmpty SupportedAttestationStatementFormats
-> SupportedAttestationStatementFormats)
-> (forall b.
Integral b =>
b
-> SupportedAttestationStatementFormats
-> SupportedAttestationStatementFormats)
-> Semigroup SupportedAttestationStatementFormats
forall b.
Integral b =>
b
-> SupportedAttestationStatementFormats
-> SupportedAttestationStatementFormats
forall a.
(a -> a -> a)
-> (NonEmpty a -> a)
-> (forall b. Integral b => b -> a -> a)
-> Semigroup a
stimes :: forall b.
Integral b =>
b
-> SupportedAttestationStatementFormats
-> SupportedAttestationStatementFormats
$cstimes :: forall b.
Integral b =>
b
-> SupportedAttestationStatementFormats
-> SupportedAttestationStatementFormats
sconcat :: NonEmpty SupportedAttestationStatementFormats
-> SupportedAttestationStatementFormats
$csconcat :: NonEmpty SupportedAttestationStatementFormats
-> SupportedAttestationStatementFormats
<> :: SupportedAttestationStatementFormats
-> SupportedAttestationStatementFormats
-> SupportedAttestationStatementFormats
$c<> :: SupportedAttestationStatementFormats
-> SupportedAttestationStatementFormats
-> SupportedAttestationStatementFormats
Semigroup, Semigroup SupportedAttestationStatementFormats
SupportedAttestationStatementFormats
Semigroup SupportedAttestationStatementFormats
-> SupportedAttestationStatementFormats
-> (SupportedAttestationStatementFormats
-> SupportedAttestationStatementFormats
-> SupportedAttestationStatementFormats)
-> ([SupportedAttestationStatementFormats]
-> SupportedAttestationStatementFormats)
-> Monoid SupportedAttestationStatementFormats
[SupportedAttestationStatementFormats]
-> SupportedAttestationStatementFormats
SupportedAttestationStatementFormats
-> SupportedAttestationStatementFormats
-> SupportedAttestationStatementFormats
forall a.
Semigroup a -> a -> (a -> a -> a) -> ([a] -> a) -> Monoid a
mconcat :: [SupportedAttestationStatementFormats]
-> SupportedAttestationStatementFormats
$cmconcat :: [SupportedAttestationStatementFormats]
-> SupportedAttestationStatementFormats
mappend :: SupportedAttestationStatementFormats
-> SupportedAttestationStatementFormats
-> SupportedAttestationStatementFormats
$cmappend :: SupportedAttestationStatementFormats
-> SupportedAttestationStatementFormats
-> SupportedAttestationStatementFormats
mempty :: SupportedAttestationStatementFormats
$cmempty :: SupportedAttestationStatementFormats
Monoid)
singletonAttestationStatementFormat :: SomeAttestationStatementFormat -> SupportedAttestationStatementFormats
singletonAttestationStatementFormat :: SomeAttestationStatementFormat
-> SupportedAttestationStatementFormats
singletonAttestationStatementFormat someFormat :: SomeAttestationStatementFormat
someFormat@(SomeAttestationStatementFormat a
format) =
HashMap Text SomeAttestationStatementFormat
-> SupportedAttestationStatementFormats
SupportedAttestationStatementFormats (HashMap Text SomeAttestationStatementFormat
-> SupportedAttestationStatementFormats)
-> HashMap Text SomeAttestationStatementFormat
-> SupportedAttestationStatementFormats
forall a b. (a -> b) -> a -> b
$ Text
-> SomeAttestationStatementFormat
-> HashMap Text SomeAttestationStatementFormat
forall k v. Hashable k => k -> v -> HashMap k v
HashMap.singleton (a -> Text
forall a. AttestationStatementFormat a => a -> Text
asfIdentifier a
format) SomeAttestationStatementFormat
someFormat
lookupAttestationStatementFormat ::
Text ->
SupportedAttestationStatementFormats ->
Maybe SomeAttestationStatementFormat
lookupAttestationStatementFormat :: Text
-> SupportedAttestationStatementFormats
-> Maybe SomeAttestationStatementFormat
lookupAttestationStatementFormat Text
id (SupportedAttestationStatementFormats HashMap Text SomeAttestationStatementFormat
sasf) = HashMap Text SomeAttestationStatementFormat
sasf HashMap Text SomeAttestationStatementFormat
-> Text -> Maybe SomeAttestationStatementFormat
forall k v. (Eq k, Hashable k) => HashMap k v -> k -> Maybe v
!? Text
id
data AttestationObject raw = forall a.
AttestationStatementFormat a =>
AttestationObject
{
forall (raw :: Bool).
AttestationObject raw -> AuthenticatorData 'Registration raw
aoAuthData :: AuthenticatorData 'Registration raw,
()
aoFmt :: a,
()
aoAttStmt :: AttStmt a
}
instance Eq (AttestationObject raw) where
AttestationObject {aoAuthData :: forall (raw :: Bool).
AttestationObject raw -> AuthenticatorData 'Registration raw
aoAuthData = AuthenticatorData 'Registration raw
lAuthData, aoFmt :: ()
aoFmt = a
lFmt, aoAttStmt :: ()
aoAttStmt = AttStmt a
lAttStmt}
== :: AttestationObject raw -> AttestationObject raw -> Bool
== AttestationObject {aoAuthData :: forall (raw :: Bool).
AttestationObject raw -> AuthenticatorData 'Registration raw
aoAuthData = AuthenticatorData 'Registration raw
rAuthData, aoFmt :: ()
aoFmt = a
rFmt, aoAttStmt :: ()
aoAttStmt = AttStmt a
rAttStmt} =
AuthenticatorData 'Registration raw
lAuthData AuthenticatorData 'Registration raw
-> AuthenticatorData 'Registration raw -> Bool
forall a. Eq a => a -> a -> Bool
== AuthenticatorData 'Registration raw
rAuthData
Bool -> Bool -> Bool
&& case TypeRep a -> TypeRep a -> Maybe (a :~~: a)
forall k1 k2 (a :: k1) (b :: k2).
TypeRep a -> TypeRep b -> Maybe (a :~~: b)
eqTypeRep (a -> TypeRep a
forall a. Typeable a => a -> TypeRep a
typeOf a
lFmt) (a -> TypeRep a
forall a. Typeable a => a -> TypeRep a
typeOf a
rFmt) of
Just a :~~: a
HRefl -> AttStmt a
lAttStmt AttStmt a -> AttStmt a -> Bool
forall a. Eq a => a -> a -> Bool
== AttStmt a
AttStmt a
rAttStmt
Maybe (a :~~: a)
Nothing -> Bool
False
deriving instance Show (AttestationObject raw)
instance ToJSON (AttestationObject raw) where
toJSON :: AttestationObject raw -> Value
toJSON AttestationObject {a
AttStmt a
AuthenticatorData 'Registration raw
aoAttStmt :: AttStmt a
aoFmt :: a
aoAuthData :: AuthenticatorData 'Registration raw
aoAttStmt :: ()
aoFmt :: ()
aoAuthData :: forall (raw :: Bool).
AttestationObject raw -> AuthenticatorData 'Registration raw
..} =
[Pair] -> Value
object
[ Key
"aoAuthData" Key -> AuthenticatorData 'Registration raw -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= AuthenticatorData 'Registration raw
aoAuthData,
Key
"aoFmt" Key -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= a -> Text
forall a. AttestationStatementFormat a => a -> Text
asfIdentifier a
aoFmt,
Key
"aoAttStmt" Key -> AttStmt a -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= AttStmt a
aoAttStmt
]
data AuthenticatorResponse (c :: CeremonyKind) raw where
AuthenticatorResponseRegistration ::
{
forall (raw :: Bool).
AuthenticatorResponse 'Registration raw
-> CollectedClientData 'Registration raw
arrClientData :: CollectedClientData 'Registration raw,
forall (raw :: Bool).
AuthenticatorResponse 'Registration raw -> AttestationObject raw
arrAttestationObject :: AttestationObject raw,
forall (raw :: Bool).
AuthenticatorResponse 'Registration raw -> [AuthenticatorTransport]
arrTransports :: [AuthenticatorTransport]
} ->
AuthenticatorResponse 'Registration raw
AuthenticatorResponseAuthentication ::
{
forall (raw :: Bool).
AuthenticatorResponse 'Authentication raw
-> CollectedClientData 'Authentication raw
araClientData :: CollectedClientData 'Authentication raw,
forall (raw :: Bool).
AuthenticatorResponse 'Authentication raw
-> AuthenticatorData 'Authentication raw
araAuthenticatorData :: AuthenticatorData 'Authentication raw,
forall (raw :: Bool).
AuthenticatorResponse 'Authentication raw -> AssertionSignature
araSignature :: AssertionSignature,
forall (raw :: Bool).
AuthenticatorResponse 'Authentication raw -> Maybe UserHandle
araUserHandle :: Maybe UserHandle
} ->
AuthenticatorResponse 'Authentication raw
deriving instance Eq (AuthenticatorResponse c raw)
deriving instance Show (AuthenticatorResponse c raw)
instance ToJSON (AuthenticatorResponse c raw) where
toJSON :: AuthenticatorResponse c raw -> Value
toJSON AuthenticatorResponseRegistration {[AuthenticatorTransport]
AttestationObject raw
CollectedClientData 'Registration raw
arrTransports :: [AuthenticatorTransport]
arrAttestationObject :: AttestationObject raw
arrClientData :: CollectedClientData 'Registration raw
arrTransports :: forall (raw :: Bool).
AuthenticatorResponse 'Registration raw -> [AuthenticatorTransport]
arrAttestationObject :: forall (raw :: Bool).
AuthenticatorResponse 'Registration raw -> AttestationObject raw
arrClientData :: forall (raw :: Bool).
AuthenticatorResponse 'Registration raw
-> CollectedClientData 'Registration raw
..} =
[Pair] -> Value
object
[ Key
"arrClientData" Key -> CollectedClientData 'Registration raw -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= CollectedClientData 'Registration raw
arrClientData,
Key
"arrAttestationObject" Key -> AttestationObject raw -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= AttestationObject raw
arrAttestationObject
]
toJSON AuthenticatorResponseAuthentication {Maybe UserHandle
AuthenticatorData 'Authentication raw
CollectedClientData 'Authentication raw
AssertionSignature
araUserHandle :: Maybe UserHandle
araSignature :: AssertionSignature
araAuthenticatorData :: AuthenticatorData 'Authentication raw
araClientData :: CollectedClientData 'Authentication raw
araUserHandle :: forall (raw :: Bool).
AuthenticatorResponse 'Authentication raw -> Maybe UserHandle
araSignature :: forall (raw :: Bool).
AuthenticatorResponse 'Authentication raw -> AssertionSignature
araAuthenticatorData :: forall (raw :: Bool).
AuthenticatorResponse 'Authentication raw
-> AuthenticatorData 'Authentication raw
araClientData :: forall (raw :: Bool).
AuthenticatorResponse 'Authentication raw
-> CollectedClientData 'Authentication raw
..} =
[Pair] -> Value
object
[ Key
"araClientData" Key -> CollectedClientData 'Authentication raw -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= CollectedClientData 'Authentication raw
araClientData,
Key
"araAuthenticatorData" Key -> AuthenticatorData 'Authentication raw -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= AuthenticatorData 'Authentication raw
araAuthenticatorData,
Key
"araSignature" Key -> AssertionSignature -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= AssertionSignature
araSignature,
Key
"araUserHandle" Key -> Maybe UserHandle -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe UserHandle
araUserHandle
]
data Credential (c :: CeremonyKind) raw = Credential
{
forall (c :: CeremonyKind) (raw :: Bool).
Credential c raw -> CredentialId
cIdentifier :: CredentialId,
forall (c :: CeremonyKind) (raw :: Bool).
Credential c raw -> AuthenticatorResponse c raw
cResponse :: AuthenticatorResponse c raw,
forall (c :: CeremonyKind) (raw :: Bool).
Credential c raw -> AuthenticationExtensionsClientOutputs
cClientExtensionResults :: AuthenticationExtensionsClientOutputs
}
deriving (Credential c raw -> Credential c raw -> Bool
(Credential c raw -> Credential c raw -> Bool)
-> (Credential c raw -> Credential c raw -> Bool)
-> Eq (Credential c raw)
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
forall (c :: CeremonyKind) (raw :: Bool).
Credential c raw -> Credential c raw -> Bool
/= :: Credential c raw -> Credential c raw -> Bool
$c/= :: forall (c :: CeremonyKind) (raw :: Bool).
Credential c raw -> Credential c raw -> Bool
== :: Credential c raw -> Credential c raw -> Bool
$c== :: forall (c :: CeremonyKind) (raw :: Bool).
Credential c raw -> Credential c raw -> Bool
Eq, Int -> Credential c raw -> ShowS
[Credential c raw] -> ShowS
Credential c raw -> String
(Int -> Credential c raw -> ShowS)
-> (Credential c raw -> String)
-> ([Credential c raw] -> ShowS)
-> Show (Credential c raw)
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
forall (c :: CeremonyKind) (raw :: Bool).
Int -> Credential c raw -> ShowS
forall (c :: CeremonyKind) (raw :: Bool).
[Credential c raw] -> ShowS
forall (c :: CeremonyKind) (raw :: Bool).
Credential c raw -> String
showList :: [Credential c raw] -> ShowS
$cshowList :: forall (c :: CeremonyKind) (raw :: Bool).
[Credential c raw] -> ShowS
show :: Credential c raw -> String
$cshow :: forall (c :: CeremonyKind) (raw :: Bool).
Credential c raw -> String
showsPrec :: Int -> Credential c raw -> ShowS
$cshowsPrec :: forall (c :: CeremonyKind) (raw :: Bool).
Int -> Credential c raw -> ShowS
Show, (forall x. Credential c raw -> Rep (Credential c raw) x)
-> (forall x. Rep (Credential c raw) x -> Credential c raw)
-> Generic (Credential c raw)
forall x. Rep (Credential c raw) x -> Credential c raw
forall x. Credential c raw -> Rep (Credential c raw) x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
forall (c :: CeremonyKind) (raw :: Bool) x.
Rep (Credential c raw) x -> Credential c raw
forall (c :: CeremonyKind) (raw :: Bool) x.
Credential c raw -> Rep (Credential c raw) x
$cto :: forall (c :: CeremonyKind) (raw :: Bool) x.
Rep (Credential c raw) x -> Credential c raw
$cfrom :: forall (c :: CeremonyKind) (raw :: Bool) x.
Credential c raw -> Rep (Credential c raw) x
Generic, [Credential c raw] -> Encoding
[Credential c raw] -> Value
Credential c raw -> Encoding
Credential c raw -> Value
(Credential c raw -> Value)
-> (Credential c raw -> Encoding)
-> ([Credential c raw] -> Value)
-> ([Credential c raw] -> Encoding)
-> ToJSON (Credential c raw)
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
forall (c :: CeremonyKind) (raw :: Bool).
[Credential c raw] -> Encoding
forall (c :: CeremonyKind) (raw :: Bool).
[Credential c raw] -> Value
forall (c :: CeremonyKind) (raw :: Bool).
Credential c raw -> Encoding
forall (c :: CeremonyKind) (raw :: Bool). Credential c raw -> Value
toEncodingList :: [Credential c raw] -> Encoding
$ctoEncodingList :: forall (c :: CeremonyKind) (raw :: Bool).
[Credential c raw] -> Encoding
toJSONList :: [Credential c raw] -> Value
$ctoJSONList :: forall (c :: CeremonyKind) (raw :: Bool).
[Credential c raw] -> Value
toEncoding :: Credential c raw -> Encoding
$ctoEncoding :: forall (c :: CeremonyKind) (raw :: Bool).
Credential c raw -> Encoding
toJSON :: Credential c raw -> Value
$ctoJSON :: forall (c :: CeremonyKind) (raw :: Bool). Credential c raw -> Value
ToJSON)