This change adds new enum type SerializationType with two values CBOR and JSON (and a static DEFAULT variable initialized to JSON).
toMap and fromMap serialization methods of webauthn classes will now encode/decode webauthn binary data in Base64 url safe format, if the wanted serialization type is JSON and use byte[] for CBOR.
The reason for adding the parameter is that when communicating with RPs, we need to use the JSON format and when communicating over CTAP we need the plain byte array format.
This PR also updated the serialization test and added hashCode() and equals(Object) overrides to all webauthn classes.
This change adds new enum type
SerializationType
with two valuesCBOR
andJSON
(and a staticDEFAULT
variable initialized toJSON
).toMap
andfromMap
serialization methods of webauthn classes will now encode/decode webauthn binary data in Base64 url safe format, if the wanted serialization type isJSON
and usebyte[]
forCBOR
.The reason for adding the parameter is that when communicating with RPs, we need to use the JSON format and when communicating over CTAP we need the plain byte array format.
This PR also updated the serialization test and added
hashCode()
andequals(Object)
overrides to all webauthn classes.