AiutaAuthentication.fromJson constructor
Factory method to create AiutaAuthentication from json.
Implementation
factory AiutaAuthentication.fromJson(Map<String, dynamic> json) {
switch (json['mode'] as String) {
case 'apiKey':
return ApiKeyAuthentication.fromJson(json);
case 'jwt':
return JWTAuthentication.fromJson(json);
default:
throw Exception('Unknown authentication type');
}
}