toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final map = <String, dynamic>{'name': name, 'grants': grants.map((g) => g.toJson()).toList(), 'version': version};
  if (projectId != null) map['sub'] = projectId;
  if (apiKeyId != null) map['kid'] = apiKeyId;
  return map;
}