webauthn-0.4.1.2: Relying party (server) implementation of the WebAuthn 2 specification
Stabilityexperimental
Safe HaskellSafe-Inferred
LanguageHaskell2010

Crypto.WebAuthn.Encoding.Strings

Description

This module provides functions for encoding and decoding WebAuthn enum types between their Haskell types defined in Crypto.WebAuthn.Model.Types and their string forms.

Synopsis

Documentation

decodeCredentialType :: Text -> Either Text CredentialType Source #

(spec) Decodes a string into a CredentialType, returning Left when the string isn't known to be an enum value.

decodeUserVerificationRequirement :: Text -> Either Text UserVerificationRequirement Source #

(spec) Decodes a string into a UserVerificationRequirement, returning Left when the string isn't known to be an enum value.

decodeAuthenticatorAttachment :: Text -> Either Text AuthenticatorAttachment Source #

(spec) Decodes a string into a AuthenticatorAttachment, returning Left when the string isn't known to be an enum value.

decodeResidentKeyRequirement :: Text -> Either Text ResidentKeyRequirement Source #

(spec) Decodes a string into a ResidentKeyRequirement, returning Left when the string isn't known to be an enum value.

decodeAttestationConveyancePreference :: Text -> Either Text AttestationConveyancePreference Source #

(spec) Decodes a string into a AttestationConveyancePreference, returning Left when the string isn't known to be an enum value.

decodeAuthenticatorTransport :: Text -> AuthenticatorTransport Source #

(spec) Decodes a string into a AuthenticatorTransport, returning AuthenticatorTransportUnknown when the string isn't known to be an enum value. This is required so that relying parties can still store unknown values, see transports and the clarification to that section here