Stability | internal |
---|---|
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Crypto.WebAuthn.Encoding.Internal.WebAuthnJson
Description
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 AuthenticationExtensionsClientInputs
- data PublicKeyCredentialRequestOptions = PublicKeyCredentialRequestOptions {}
- data PublicKeyCredential response = PublicKeyCredential {}
- data AuthenticatorAttestationResponse = AuthenticatorAttestationResponse {}
- data AuthenticatorAssertionResponse = AuthenticatorAssertionResponse {}
- data PublicKeyCredentialRpEntity = PublicKeyCredentialRpEntity {}
- data PublicKeyCredentialUserEntity = PublicKeyCredentialUserEntity {
- id :: Base64UrlString
- displayName :: Text
- name :: Text
- data PublicKeyCredentialParameters = PublicKeyCredentialParameters {}
- newtype AuthenticationExtensionsClientInputs = AuthenticationExtensionsClientInputs {}
- newtype AuthenticationExtensionsClientOutputs = AuthenticationExtensionsClientOutputs {}
- newtype CredentialPropertiesOutput = CredentialPropertiesOutput {}
- 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 #
Constructors
Instances
data PublicKeyCredentialRequestOptions Source #
Constructors
PublicKeyCredentialRequestOptions | |
Instances
data PublicKeyCredential response Source #
Constructors
PublicKeyCredential | |
Instances
Nested types
data AuthenticatorAttestationResponse Source #
Constructors
AuthenticatorAttestationResponse | |
Fields
|
Instances
data AuthenticatorAssertionResponse Source #
Constructors
AuthenticatorAssertionResponse | |
Instances
data PublicKeyCredentialRpEntity Source #
Instances
data PublicKeyCredentialUserEntity Source #
Constructors
PublicKeyCredentialUserEntity | |
Fields
|
Instances
data PublicKeyCredentialParameters Source #
Constructors
PublicKeyCredentialParameters | |
Instances
newtype AuthenticationExtensionsClientInputs Source #
Constructors
AuthenticationExtensionsClientInputs | |
Instances
newtype AuthenticationExtensionsClientOutputs Source #
Constructors
AuthenticationExtensionsClientOutputs | |
Instances
newtype CredentialPropertiesOutput Source #
Constructors
CredentialPropertiesOutput | |
Instances
data PublicKeyCredentialDescriptor Source #
Constructors
PublicKeyCredentialDescriptor | |
Fields
|
Instances
data AuthenticatorSelectionCriteria Source #
Constructors
AuthenticatorSelectionCriteria | |
Instances
newtype Base64UrlString Source #
Constructors
Base64UrlString | |
Fields |
Instances
FromJSON Base64UrlString Source # | Decodes a base64url encoded JSON string into the bytes it represents |
Defined in Crypto.WebAuthn.Encoding.Internal.WebAuthnJson Methods 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 Methods toJSON :: Base64UrlString -> Value # toEncoding :: Base64UrlString -> Encoding # toJSONList :: [Base64UrlString] -> Value # toEncodingList :: [Base64UrlString] -> Encoding # | |
Show Base64UrlString Source # | |
Defined in Crypto.WebAuthn.Encoding.Internal.WebAuthnJson Methods showsPrec :: Int -> Base64UrlString -> ShowS # show :: Base64UrlString -> String # showList :: [Base64UrlString] -> ShowS # | |
Eq Base64UrlString Source # | |
Defined in Crypto.WebAuthn.Encoding.Internal.WebAuthnJson Methods (==) :: 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
Minimal complete definition
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
Minimal complete definition
Nothing
Methods
decode :: MonadError Text m => JSON a -> m a Source #
Decodes a webauthn-json type, potentially throwing a Text
error