toCborMap method

  1. @override
Map<int, CborValue> toCborMap()

Serializes this instance to a Map from CBOR labels to CborValues.

Implementation

@override
Map<int, CborValue> toCborMap() {
  return {
    if (authorizationServer != null)
      constants.AS: CborString(authorizationServer!),
    if (keyID != null) constants.kId: CborBytes(keyID!),
    if (audience != null) constants.audience: CborString(audience!),
    if (scope != null) constants.scope: scope!.toCborValue(),
    if (clientNonce != null) constants.cNonce: CborBytes(clientNonce!)
  };
}