Stability | internal |
---|---|
Safe Haskell | None |
Language | Haskell2010 |
Certain parts of the specification require that data is decoded from a binary form. This module holds such functions.
Synopsis
- decodeAuthenticatorData :: forall c. SingI c => ByteString -> Either Text (AuthenticatorData c 'True)
- decodeAttestationObject :: SupportedAttestationStatementFormats -> ByteString -> Either Text (AttestationObject 'True)
- decodeCollectedClientData :: forall c. SingI c => ByteString -> Either Text (CollectedClientData c 'True)
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