Stability | internal |
---|---|
Safe Haskell | None |
Language | Haskell2010 |
Certain parts of the specification require that data is encoded to a binary form. This module holds such functions.
Synopsis
- encodeRawCredential :: forall c raw. SingI c => Credential c raw -> Credential c 'True
- encodeRawAuthenticatorData :: forall c raw. SingI c => AuthenticatorData c raw -> AuthenticatorData c 'True
- encodeRawCollectedClientData :: forall c raw. SingI c => CollectedClientData c raw -> CollectedClientData c 'True
- encodeAttestationObject :: AttestationObject 'True -> ByteString
- encodeCollectedClientData :: forall c. SingI c => CollectedClientData c 'True -> ByteString
Encoding raw fields
encodeRawCredential :: forall c raw. SingI c => Credential c raw -> Credential c 'True Source #
Encodes all raw fields of a Credential
. This function is
mainly useful for testing that the encoding/decoding functions are correct.
The counterpart to this function is stripRawCredential
encodeRawAuthenticatorData :: forall c raw. SingI c => AuthenticatorData c raw -> AuthenticatorData c 'True Source #
Encodes all raw fields of a AuthenticatorData
. This function is needed
for an authenticator implementation
encodeRawCollectedClientData :: forall c raw. SingI c => CollectedClientData c raw -> CollectedClientData c 'True Source #
Encodes all raw fields of a CollectedClientData
. This function is
needed for a client implementation
Encoding structures to bytes
encodeAttestationObject :: AttestationObject 'True -> ByteString Source #
Encodes an AttestationObject
as a ByteString
. This is needed by
the client side to generate a valid JSON response
encodeCollectedClientData :: forall c. SingI c => CollectedClientData c 'True -> ByteString Source #
Encodes an CollectedClientData
as a ByteString
. This is needed by
the client side to generate a valid JSON response