- {{.i18n.Tr "twofa"}} -
-{{.i18n.Tr "u2f_insert_key"}}
- {{template "base/alert" .}} -{{.i18n.Tr "u2f_sign_in"}}
-{{.i18n.Tr "u2f_sign_in"}}
-{{.i18n.Tr "webauthn_sign_in"}}
+{{.i18n.Tr "settings.u2f_desc" | Str2html}}
+{{.i18n.Tr "settings.webauthn_desc" | Str2html}}
{{.i18n.Tr "settings.u2f_delete_key_desc"}}
+{{.i18n.Tr "settings.webauthn_delete_key_desc"}}
+ +![alt text](https://github.com/fxamacker/images/raw/master/cbor/v2.2.0/cbor_features.svg?sanitize=1 "CBOR Features") + +
+ +v2.0 decoupled options from CBOR encoding & decoding functions: + +* More encoding/decoding function signatures are identical to encoding/json. +* More function signatures can remain stable forever. +* More flexibility for evolving internal data types, optimizations, and concurrency. +* Features like CBOR tags can be added without more breaking API changes. +* Options to handle duplicate map keys can be added without more breaking API changes. + +
+ +This library provides options for fast detection and rejection of duplicate map keys based on applying a Go-specific data model to CBOR's extended generic data model in order to determine duplicate vs distinct map keys. Detection relies on whether the CBOR map key would be a duplicate "key" when decoded and applied to the user-provided Go map or struct. + +`DupMapKeyQuiet` turns off detection of duplicate map keys. It tries to use a "keep fastest" method by choosing either "keep first" or "keep last" depending on the Go data type. + +`DupMapKeyEnforcedAPF` enforces detection and rejection of duplidate map keys. Decoding stops immediately and returns `DupMapKeyError` when the first duplicate key is detected. The error includes the duplicate map key and the index number. + +APF suffix means "Allow Partial Fill" so the destination map or struct can contain some decoded values at the time of error. It is the caller's responsibility to respond to the `DupMapKeyError` by discarding the partially filled result if that's required by their protocol. + +