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

Crypto.WebAuthn.Metadata.Service.Decode

Description

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

Synopsis

Documentation

decodeMetadataPayload :: MetadataBLOBPayload -> These (NonEmpty Text) MetadataPayload Source #

Decodes a MetadataPayload from a MetadataBLOBPayload, discarding any MetadataBLOBPayloadEntry that are not relevant to webauthn. This includes entries of the protocol family ProtocolFamilyUAF and entries whose attestationTypes doesn't include either ATTESTATION_BASIC_FULL or ATTESTATION_ATTCA

decodeMetadataEntry :: MetadataBLOBPayloadEntry -> Maybe (Either Text (NonEmpty SomeMetadataEntry)) Source #

(spec) | Decodes a MetadataBLOBPayloadEntry into one or more SomeMetadataEntry. If the entry is not relevant for webauthn (i.e. UAF authenticators or FIDO2 authenticators that only support basic surrogate attestation), then this function returns Nothing. If an error occured during decoding, Left is returned.