toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final Map<String, dynamic> data = payload;
  data['sub'] = sub;
  data['iss'] = iss;
  data['exp'] = exp != null ? exp!.millisecondsSinceEpoch ~/ 1000 : 0;
  data['iat'] = iat != null ? iat!.millisecondsSinceEpoch ~/ 1000 : 0;
  data['aud'] = aud;
  return data;
}