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

Crypto.WebAuthn.Model.WebIDL.Internal.Binary.Decoding

Description

Certain parts of the specification require that data is decoded from a binary form. This module holds such functions.

Synopsis

Decoding from bytes

decodeAuthenticatorData :: forall c. SingI c => ByteString -> Either Text (AuthenticatorData c 'True) Source #

Decodes a AuthenticatorData from a ByteString. This is needed to parse a webauthn clients authenticatorData field in the AuthenticatorAssertionResponse structure

decodeAttestationObject :: SupportedAttestationStatementFormats -> ByteString -> Either Text (AttestationObject 'True) Source #

Decodes a AttestationObject from a ByteString. This is needed to parse a webauthn clients attestationObject field in the AuthenticatorAttestationResponse structure This function takes a SupportedAttestationStatementFormats argument to indicate which attestation statement formats are supported. structure

decodeCollectedClientData :: forall c. SingI c => ByteString -> Either Text (CollectedClientData c 'True) Source #

Decodes a CollectedClientData from a ByteString. This is needed to parse the clientDataJSON field in the AuthenticatorResponse structure, which is used for both attestation and assertion