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

Crypto.WebAuthn.Metadata.Statement.Decode

Description

This module contains functions to further decode FIDO Metadata Statement IDL types defined in IDL into the Haskell-specific types defined in Types

Synopsis

Documentation

decodeMetadataStatement Source #

Arguments

:: MetadataStatement

The raw metadata statement, directly parsed from JSON

-> Either (Maybe Text) MetadataStatement

Either an early exit with Left, where Left Nothing signals that this entry can be skipped because it's not relevant for Webauthn, and Left . Just signals that an error happened during decoding Otherwise a successful result with Right

Fully decodes a MetadataStatement. The p type parameter is the ProtocolFamily that this metadata statement is for.

decodeAAGUID :: AAGUID -> Either Text (AuthenticatorIdentifier 'Fido2) Source #

Decodes an AAGUID from an aaguid field of a metadata statement or an aaguid field of a metadata service payload entry field

decodeCertificate :: DOMString -> Either Text SignedCertificate Source #

Decodes a SignedCertificate from an attestationRootCertificates field of a metadata statement or the certificate field of a metadata service status report