{-# 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 (..),
CredentialPropertiesOutput (..),
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) = forall a. ToJSON a => a -> Value
toJSON ByteString
bytes
data CredentialType = CredentialTypePublicKey
deriving (CredentialType -> CredentialType -> Bool
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
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
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]
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
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. 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
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
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
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. 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
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
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
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
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]
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
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. 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
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
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
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
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]
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
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. 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
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
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
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
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]
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
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.
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
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
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
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
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]
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
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.
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
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) = forall a. ToJSON a => a -> Value
toJSON NonEmpty SignedCertificate
chain
toJSON (FidoU2FCert SignedCertificate
cert) = forall a. ToJSON a => a -> Value
toJSON [SignedCertificate
cert]
data VerifiableAttestationType
=
VerifiableAttestationTypeUncertain
|
VerifiableAttestationTypeBasic
|
VerifiableAttestationTypeAttCA
|
VerifiableAttestationTypeAnonCA
deriving (VerifiableAttestationType -> VerifiableAttestationType -> Bool
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
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
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]
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
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.
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
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" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text -> Value
String Text
"AttestationTypeNone"
]
toJSON AttestationType k
AttestationTypeSelf =
[Pair] -> Value
object
[ Key
"tag" 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" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text -> Value
String Text
"AttestationTypeVerifiable",
Key
"atvType" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= VerifiableAttestationType
atvType,
Key
"atvChain" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= AttestationChain p
atvChain
]
newtype RpId = RpId {RpId -> Text
unRpId :: Text}
deriving (RpId -> RpId -> Bool
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
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
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
forall a. (String -> a) -> IsString a
fromString :: String -> RpId
$cfromString :: String -> RpId
IsString, [RpId] -> Encoding
[RpId] -> Value
RpId -> Encoding
RpId -> Value
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
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
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
forall a. (String -> a) -> IsString a
fromString :: String -> RelyingPartyName
$cfromString :: String -> RelyingPartyName
IsString, [RelyingPartyName] -> Encoding
[RelyingPartyName] -> Value
RelyingPartyName -> Encoding
RelyingPartyName -> Value
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
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
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
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
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 forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> forall (m :: * -> *) byteArray.
(MonadRandom m, ByteArray byteArray) =>
Int -> m byteArray
getRandomBytes Int
16
newtype UserAccountDisplayName = UserAccountDisplayName {UserAccountDisplayName -> Text
unUserAccountDisplayName :: Text}
deriving (UserAccountDisplayName -> UserAccountDisplayName -> Bool
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
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
forall a. (String -> a) -> IsString a
fromString :: String -> UserAccountDisplayName
$cfromString :: String -> UserAccountDisplayName
IsString, [UserAccountDisplayName] -> Encoding
[UserAccountDisplayName] -> Value
UserAccountDisplayName -> Encoding
UserAccountDisplayName -> Value
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
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
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
forall a. (String -> a) -> IsString a
fromString :: String -> UserAccountName
$cfromString :: String -> UserAccountName
IsString, [UserAccountName] -> Encoding
[UserAccountName] -> Value
UserAccountName -> Encoding
UserAccountName -> Value
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
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
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
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
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 forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> 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
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
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
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
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 forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> forall (m :: * -> *) byteArray.
(MonadRandom m, ByteArray byteArray) =>
Int -> m byteArray
getRandomBytes Int
16
newtype Timeout = Timeout {Timeout -> Word32
unTimeout :: Word32}
deriving (Timeout -> Timeout -> Bool
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
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
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
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
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
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
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
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
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
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
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
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
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
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
forall a. (String -> a) -> IsString a
fromString :: String -> Origin
$cfromString :: String -> Origin
IsString, [Origin] -> Encoding
[Origin] -> Value
Origin -> Encoding
Origin -> Value
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
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
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
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
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
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
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
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
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)
newtype AuthenticationExtensionsClientInputs = AuthenticationExtensionsClientInputs
{
AuthenticationExtensionsClientInputs -> Maybe Bool
aeciCredProps :: Maybe Bool
}
deriving (AuthenticationExtensionsClientInputs
-> AuthenticationExtensionsClientInputs -> Bool
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
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)
deriving newtype ([AuthenticationExtensionsClientInputs] -> Encoding
[AuthenticationExtensionsClientInputs] -> Value
AuthenticationExtensionsClientInputs -> Encoding
AuthenticationExtensionsClientInputs -> Value
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [AuthenticationExtensionsClientInputs] -> Encoding
$ctoEncodingList :: [AuthenticationExtensionsClientInputs] -> Encoding
toJSONList :: [AuthenticationExtensionsClientInputs] -> Value
$ctoJSONList :: [AuthenticationExtensionsClientInputs] -> Value
toEncoding :: AuthenticationExtensionsClientInputs -> Encoding
$ctoEncoding :: AuthenticationExtensionsClientInputs -> Encoding
toJSON :: AuthenticationExtensionsClientInputs -> Value
$ctoJSON :: AuthenticationExtensionsClientInputs -> Value
ToJSON)
newtype CredentialPropertiesOutput = CredentialPropertiesOutput
{
CredentialPropertiesOutput -> Maybe Bool
cpoRk :: Maybe Bool
}
deriving (CredentialPropertiesOutput -> CredentialPropertiesOutput -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CredentialPropertiesOutput -> CredentialPropertiesOutput -> Bool
$c/= :: CredentialPropertiesOutput -> CredentialPropertiesOutput -> Bool
== :: CredentialPropertiesOutput -> CredentialPropertiesOutput -> Bool
$c== :: CredentialPropertiesOutput -> CredentialPropertiesOutput -> Bool
Eq, Int -> CredentialPropertiesOutput -> ShowS
[CredentialPropertiesOutput] -> ShowS
CredentialPropertiesOutput -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CredentialPropertiesOutput] -> ShowS
$cshowList :: [CredentialPropertiesOutput] -> ShowS
show :: CredentialPropertiesOutput -> String
$cshow :: CredentialPropertiesOutput -> String
showsPrec :: Int -> CredentialPropertiesOutput -> ShowS
$cshowsPrec :: Int -> CredentialPropertiesOutput -> ShowS
Show)
deriving newtype ([CredentialPropertiesOutput] -> Encoding
[CredentialPropertiesOutput] -> Value
CredentialPropertiesOutput -> Encoding
CredentialPropertiesOutput -> Value
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [CredentialPropertiesOutput] -> Encoding
$ctoEncodingList :: [CredentialPropertiesOutput] -> Encoding
toJSONList :: [CredentialPropertiesOutput] -> Value
$ctoJSONList :: [CredentialPropertiesOutput] -> Value
toEncoding :: CredentialPropertiesOutput -> Encoding
$ctoEncoding :: CredentialPropertiesOutput -> Encoding
toJSON :: CredentialPropertiesOutput -> Value
$ctoJSON :: CredentialPropertiesOutput -> Value
ToJSON)
newtype AuthenticationExtensionsClientOutputs = AuthenticationExtensionsClientOutputs
{
AuthenticationExtensionsClientOutputs
-> Maybe CredentialPropertiesOutput
aecoCredProps :: Maybe CredentialPropertiesOutput
}
deriving (AuthenticationExtensionsClientOutputs
-> AuthenticationExtensionsClientOutputs -> Bool
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
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)
deriving newtype ([AuthenticationExtensionsClientOutputs] -> Encoding
[AuthenticationExtensionsClientOutputs] -> Value
AuthenticationExtensionsClientOutputs -> Encoding
AuthenticationExtensionsClientOutputs -> Value
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [AuthenticationExtensionsClientOutputs] -> Encoding
$ctoEncodingList :: [AuthenticationExtensionsClientOutputs] -> Encoding
toJSONList :: [AuthenticationExtensionsClientOutputs] -> Value
$ctoJSONList :: [AuthenticationExtensionsClientOutputs] -> Value
toEncoding :: AuthenticationExtensionsClientOutputs -> Encoding
$ctoEncoding :: AuthenticationExtensionsClientOutputs -> Encoding
toJSON :: AuthenticationExtensionsClientOutputs -> Value
$ctoJSON :: AuthenticationExtensionsClientOutputs -> Value
ToJSON)
data AuthenticatorExtensionOutputs = AuthenticatorExtensionOutputs
{
}
deriving (AuthenticatorExtensionOutputs
-> AuthenticatorExtensionOutputs -> Bool
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
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
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
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. 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
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
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
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. 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
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
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
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. 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
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
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
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. 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
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
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
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.
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
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
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
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. 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
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" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text -> Value
String Text
"CredentialOptionsRegistration",
Key
"corRp" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= CredentialRpEntity
corRp,
Key
"corUser" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= CredentialUserEntity
corUser,
Key
"corChallenge" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Challenge
corChallenge,
Key
"corPubKeyCredParams" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= [CredentialParameters]
corPubKeyCredParams,
Key
"corTimeout" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Timeout
corTimeout,
Key
"corExcludeCredentials" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= [CredentialDescriptor]
corExcludeCredentials,
Key
"corAuthenticatorSelection" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe AuthenticatorSelectionCriteria
corAuthenticatorSelection,
Key
"corAttestation" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= AttestationConveyancePreference
corAttestation,
Key
"corExtensions" 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" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Text -> Value
String Text
"CredentialOptionsAuthentication",
Key
"coaChallenge" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Challenge
coaChallenge,
Key
"coaTimeout" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Timeout
coaTimeout,
Key
"coaRpId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe RpId
coaRpId,
Key
"coaAllowCredentials" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= [CredentialDescriptor]
coaAllowCredentials,
Key
"coaUserVerification" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= UserVerificationRequirement
coaUserVerification,
Key
"coaExtensions" 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
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
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" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= forall {k} (a :: k). SingI a => Sing a
sing @c,
Key
"ccdChallenge" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Challenge
ccdChallenge,
Key
"ccdOrigin" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Origin
ccdOrigin,
Key
"ccdCrossOrigin" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= Maybe Bool
ccdCrossOrigin,
Key
"ccdRawData" 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" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= AAGUID
acdAaguid,
Key
"acdCredentialId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= CredentialId
acdCredentialId,
Key
"acdCredentialPublicKey" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= CosePublicKey
acdCredentialPublicKey,
Key
"acdCredentialPublicKeyBytes" 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
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
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 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, 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
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
[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 forall a b. (a -> b) -> a -> b
$ forall k v. Hashable k => k -> v -> HashMap k v
HashMap.singleton (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 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 forall a. Eq a => a -> a -> Bool
== AuthenticatorData 'Registration raw
rAuthData
Bool -> Bool -> Bool
&& case forall k1 k2 (a :: k1) (b :: k2).
TypeRep a -> TypeRep b -> Maybe (a :~~: b)
eqTypeRep (forall a. Typeable a => a -> TypeRep a
typeOf a
lFmt) (forall a. Typeable a => a -> TypeRep a
typeOf a
rFmt) of
Just a :~~: a
HRefl -> AttStmt a
lAttStmt forall a. Eq a => a -> a -> Bool
== 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" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= AuthenticatorData 'Registration raw
aoAuthData,
Key
"aoFmt" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= forall a. AttestationStatementFormat a => a -> Text
asfIdentifier a
aoFmt,
Key
"aoAttStmt" 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" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= CollectedClientData 'Registration raw
arrClientData,
Key
"arrAttestationObject" 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" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= CollectedClientData 'Authentication raw
araClientData,
Key
"araAuthenticatorData" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= AuthenticatorData 'Authentication raw
araAuthenticatorData,
Key
"araSignature" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
.= AssertionSignature
araSignature,
Key
"araUserHandle" 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
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
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 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, 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)