toJson method

Map<String, dynamic> toJson()

Converts this instance to a JSON map.

Implementation

Map<String, dynamic> toJson() {
  return {
    'challenge': challenge,
    'rpId': relyingPartyId,
    if (timeout != null) 'timeout': timeout,
    if (allowCredentials != null && allowCredentials!.isNotEmpty)
      'allowCredentials': allowCredentials!.map((e) => e.toJson()).toList(),
    if (userVerification != null) 'userVerification': userVerification,
  };
}