Stability | internal |
---|---|
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
This module implements decoding/encoding from/to webauthn-json JSON values to the Haskell types defined in Crypto.WebAuthn.Model.Types.
Synopsis
- data PublicKeyCredentialCreationOptions = PublicKeyCredentialCreationOptions {
- rp :: PublicKeyCredentialRpEntity
- user :: PublicKeyCredentialUserEntity
- challenge :: Base64UrlString
- pubKeyCredParams :: [PublicKeyCredentialParameters]
- timeout :: Maybe Word32
- excludeCredentials :: Maybe [PublicKeyCredentialDescriptor]
- authenticatorSelection :: Maybe AuthenticatorSelectionCriteria
- attestation :: Maybe Text
- extensions :: Maybe (Map Text Value)
- data PublicKeyCredentialRequestOptions = PublicKeyCredentialRequestOptions {}
- data PublicKeyCredential response = PublicKeyCredential {
- rawId :: Base64UrlString
- response :: response
- clientExtensionResults :: Map Text Value
- data AuthenticatorAttestationResponse = AuthenticatorAttestationResponse {}
- data AuthenticatorAssertionResponse = AuthenticatorAssertionResponse {}
- data PublicKeyCredentialRpEntity = PublicKeyCredentialRpEntity {}
- data PublicKeyCredentialUserEntity = PublicKeyCredentialUserEntity {
- id :: Base64UrlString
- displayName :: Text
- name :: Text
- data PublicKeyCredentialParameters = PublicKeyCredentialParameters {}
- type COSEAlgorithmIdentifier = Int32
- data PublicKeyCredentialDescriptor = PublicKeyCredentialDescriptor {
- littype :: Text
- id :: Base64UrlString
- transports :: Maybe [Text]
- data AuthenticatorSelectionCriteria = AuthenticatorSelectionCriteria {}
- newtype Base64UrlString = Base64UrlString {}
- class Encode a where
- class Encode a => Decode m a where
- decode :: MonadError Text m => JSON a -> m a
Top-level types
data PublicKeyCredentialCreationOptions Source #
Instances
data PublicKeyCredentialRequestOptions Source #
Instances
data PublicKeyCredential response Source #
PublicKeyCredential | |
|
Instances
Nested types
data AuthenticatorAttestationResponse Source #
AuthenticatorAttestationResponse | |
|
Instances
FromJSON AuthenticatorAttestationResponse Source # | |
ToJSON AuthenticatorAttestationResponse Source # | |
Generic AuthenticatorAttestationResponse Source # | |
Show AuthenticatorAttestationResponse Source # | |
Eq AuthenticatorAttestationResponse Source # | |
type Rep AuthenticatorAttestationResponse Source # | |
Defined in Crypto.WebAuthn.Encoding.Internal.WebAuthnJson type Rep AuthenticatorAttestationResponse = D1 ('MetaData "AuthenticatorAttestationResponse" "Crypto.WebAuthn.Encoding.Internal.WebAuthnJson" "webauthn-0.4.1.1-inplace" 'False) (C1 ('MetaCons "AuthenticatorAttestationResponse" 'PrefixI 'True) (S1 ('MetaSel ('Just "clientDataJSON") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Base64UrlString) :*: (S1 ('MetaSel ('Just "attestationObject") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Base64UrlString) :*: S1 ('MetaSel ('Just "transports") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe [Text]))))) |
data AuthenticatorAssertionResponse Source #
Instances
data PublicKeyCredentialRpEntity Source #
Instances
data PublicKeyCredentialUserEntity Source #
Instances
data PublicKeyCredentialParameters Source #
Instances
data PublicKeyCredentialDescriptor Source #
Instances
data AuthenticatorSelectionCriteria Source #
Instances
newtype Base64UrlString Source #
Instances
FromJSON Base64UrlString Source # | Decodes a base64url encoded JSON string into the bytes it represents |
Defined in Crypto.WebAuthn.Encoding.Internal.WebAuthnJson parseJSON :: Value -> Parser Base64UrlString # parseJSONList :: Value -> Parser [Base64UrlString] # | |
ToJSON Base64UrlString Source # | Encodes bytes using base64url to a JSON string |
Defined in Crypto.WebAuthn.Encoding.Internal.WebAuthnJson toJSON :: Base64UrlString -> Value # toEncoding :: Base64UrlString -> Encoding # toJSONList :: [Base64UrlString] -> Value # toEncodingList :: [Base64UrlString] -> Encoding # | |
Show Base64UrlString Source # | |
Defined in Crypto.WebAuthn.Encoding.Internal.WebAuthnJson showsPrec :: Int -> Base64UrlString -> ShowS # show :: Base64UrlString -> String # showList :: [Base64UrlString] -> ShowS # | |
Eq Base64UrlString Source # | |
Defined in Crypto.WebAuthn.Encoding.Internal.WebAuthnJson (==) :: Base64UrlString -> Base64UrlString -> Bool # (/=) :: Base64UrlString -> Base64UrlString -> Bool # |
Type classes
A type class to indicate that some Haskell type a
can be encoded to a
corresponding JSON-serializable webauthn-json type
using JSON
aencode
Nothing
Instances
class Encode a => Decode m a where Source #
An extension of Encode
to decoding. This typeclass is parametrized by a
Monad
m
since decoding certain structures requires additional
information to succeed, specifically
SupportedAttestationStatementFormats
, which can be provided with a
MonadReader
constraint
Nothing
decode :: MonadError Text m => JSON a -> m a Source #
Decodes a webauthn-json type, potentially throwing a Text
error