Stability | internal |
---|---|
Safe Haskell | None |
Language | Haskell2010 |
Internal utilities
Synopsis
- type JSONEncoding = CustomJSON '[OmitNothingFields, FieldLabelModifier (StripPrefix "lit")]
- type EnumJSONEncoding (prefix :: Symbol) = CustomJSON '[ConstructorTagModifier '[StripPrefix prefix, Lowercase]]
- newtype CustomJSON (t :: k) a = CustomJSON {
- unCustomJSON :: a
- data Lowercase
- failure :: e -> Validation (NonEmpty e) a
- certificateSubjectKeyIdentifier :: Certificate -> SubjectKeyIdentifier
- newtype IdFidoGenCeAAGUID = IdFidoGenCeAAGUID AAGUID
Documentation
type JSONEncoding = CustomJSON '[OmitNothingFields, FieldLabelModifier (StripPrefix "lit")] Source #
Custom JSONEncoding for use in the library. We add a "lit" prefix to every field that would otherwise be a Haskell keyword.
type EnumJSONEncoding (prefix :: Symbol) = CustomJSON '[ConstructorTagModifier '[StripPrefix prefix, Lowercase]] Source #
Custom JSON Encoding for enumerations, strips the given prefix and maps all constructors to lowercase.
newtype CustomJSON (t :: k) a #
A newtype wrapper which gives FromJSON/ToJSON instances with modified options.
CustomJSON | |
|
Instances
(AesonOptions t, Generic a, GToJSON Zero (Rep a), GToEncoding Zero (Rep a)) => ToJSON (CustomJSON t a) | |
Defined in Deriving.Aeson toJSON :: CustomJSON t a -> Value # toEncoding :: CustomJSON t a -> Encoding # toJSONList :: [CustomJSON t a] -> Value # toEncodingList :: [CustomJSON t a] -> Encoding # | |
(AesonOptions t, Generic a, GFromJSON Zero (Rep a)) => FromJSON (CustomJSON t a) | |
Defined in Deriving.Aeson parseJSON :: Value -> Parser (CustomJSON t a) # parseJSONList :: Value -> Parser [CustomJSON t a] # |
Type for StringModifier
that makes all characters lowercase
Instances
StringModifier Lowercase Source # | Deriving.Aeson instance turning a string into lowercase. |
Defined in Crypto.WebAuthn.Internal.Utils getStringModifier :: String -> String # |
failure :: e -> Validation (NonEmpty e) a Source #
A convenience function for creating a Validation
failure of a single
NonEmpty
value
certificateSubjectKeyIdentifier :: Certificate -> SubjectKeyIdentifier Source #
(spec) Computes the SubjectKeyIdentifier
from a Certificate
according to
method 1 in the above specification.
Note that this function only fails if the ASN1Object
instance of
PubKey
has a bug
newtype IdFidoGenCeAAGUID Source #
The `id-fido-gen-ce-aaguid` contains the AAGUID of the authenticator.
Instances
Eq IdFidoGenCeAAGUID Source # | |
Defined in Crypto.WebAuthn.Internal.Utils (==) :: IdFidoGenCeAAGUID -> IdFidoGenCeAAGUID -> Bool # (/=) :: IdFidoGenCeAAGUID -> IdFidoGenCeAAGUID -> Bool # | |
Show IdFidoGenCeAAGUID Source # | |
Defined in Crypto.WebAuthn.Internal.Utils showsPrec :: Int -> IdFidoGenCeAAGUID -> ShowS # show :: IdFidoGenCeAAGUID -> String # showList :: [IdFidoGenCeAAGUID] -> ShowS # | |
Extension IdFidoGenCeAAGUID Source # | |
Defined in Crypto.WebAuthn.Internal.Utils extOID :: IdFidoGenCeAAGUID -> OID # extHasNestedASN1 :: Proxy IdFidoGenCeAAGUID -> Bool # extEncode :: IdFidoGenCeAAGUID -> [ASN1] # extDecode :: [ASN1] -> Either String IdFidoGenCeAAGUID # extDecodeBs :: ByteString -> Either String IdFidoGenCeAAGUID # |