Skip to content

Commit

Permalink
Merge pull request #149 from MercuryTechnologies/lykahb/export-encodi…
Browse files Browse the repository at this point in the history
…ng-json-constructors

Export constructors for encoding wrappers and create FromJSON
  • Loading branch information
infinisil committed Apr 25, 2022
2 parents e52ad57 + e895567 commit ce89538
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Crypto/WebAuthn/Encoding/WebAuthnJson.hs
Expand Up @@ -8,15 +8,15 @@
module Crypto.WebAuthn.Encoding.WebAuthnJson
( -- * Registration
wjEncodeCredentialOptionsRegistration,
WJCredentialOptionsRegistration,
WJCredentialRegistration,
WJCredentialOptionsRegistration (..),
WJCredentialRegistration (..),
wjDecodeCredentialRegistration',
wjDecodeCredentialRegistration,

-- * Authentication
wjEncodeCredentialOptionsAuthentication,
WJCredentialOptionsAuthentication,
WJCredentialAuthentication,
WJCredentialOptionsAuthentication (..),
WJCredentialAuthentication (..),
wjDecodeCredentialAuthentication,
)
where
Expand Down Expand Up @@ -46,7 +46,7 @@ wjEncodeCredentialOptionsRegistration = WJCredentialOptionsRegistration <$> WJ.e
newtype WJCredentialOptionsRegistration = WJCredentialOptionsRegistration
{ _unWJCredentialOptionsRegistration :: WJ.PublicKeyCredentialCreationOptions
}
deriving newtype (Show, Eq, ToJSON)
deriving newtype (Show, Eq, FromJSON, ToJSON)

-- | The intermediate type as an input to 'wjDecodeCredentialRegistration',
-- equivalent to the [PublicKeyCredential](https://www.w3.org/TR/webauthn-2/#iface-pkcredential)
Expand Down Expand Up @@ -96,7 +96,7 @@ wjEncodeCredentialOptionsAuthentication = WJCredentialOptionsAuthentication <$>
newtype WJCredentialOptionsAuthentication = WJCredentialOptionsAuthentication
{ _unWJCredentialOptionsAuthentication :: WJ.PublicKeyCredentialRequestOptions
}
deriving newtype (Show, Eq, ToJSON)
deriving newtype (Show, Eq, FromJSON, ToJSON)

-- | The intermediate type as an input to 'wjDecodeCredentialAuthentication',
-- equivalent to the [PublicKeyCredential](https://www.w3.org/TR/webauthn-2/#iface-pkcredential)
Expand Down

0 comments on commit ce89538

Please sign in to comment.