webauthn-0.1.0.0: Relying party (server) implementation of the WebAuthn 2 specification
Stabilityinternal
Safe HaskellNone
LanguageHaskell2010

Crypto.WebAuthn.Internal.Utils

Description

Internal utilities

Synopsis

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.

Constructors

CustomJSON 

Fields

Instances

Instances details
(AesonOptions t, Generic a, GToJSON Zero (Rep a), GToEncoding Zero (Rep a)) => ToJSON (CustomJSON t a) 
Instance details

Defined in Deriving.Aeson

(AesonOptions t, Generic a, GFromJSON Zero (Rep a)) => FromJSON (CustomJSON t a) 
Instance details

Defined in Deriving.Aeson

data Lowercase Source #

Type for StringModifier that makes all characters lowercase

Instances

Instances details
StringModifier Lowercase Source #

Deriving.Aeson instance turning a string into lowercase.

Instance details

Defined in Crypto.WebAuthn.Internal.Utils

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