diff --git a/lib/src/model/auth/authentication_password.dart b/lib/src/model/auth/authentication_password.dart index 2b5cb13a..b47a17be 100644 --- a/lib/src/model/auth/authentication_password.dart +++ b/lib/src/model/auth/authentication_password.dart @@ -27,7 +27,6 @@ import 'authentication_types.dart'; import 'authentication_user_identifier.dart'; class AuthenticationPassword extends AuthenticationData { - String? user; String password; /// You may want to cast this as [AuthenticationUserIdentifier] or other @@ -35,25 +34,20 @@ class AuthenticationPassword extends AuthenticationData { AuthenticationIdentifier identifier; AuthenticationPassword( - {String? session, - required this.password, - this.user, - required this.identifier}) + {String? session, required this.password, required this.identifier}) : super( type: AuthenticationTypes.password, session: session, ); AuthenticationPassword.fromJson(Map json) - : user = json['user'], - password = json['password'], + : password = json['password'], identifier = AuthenticationIdentifier.subFromJson(json['identifier']), super.fromJson(json); @override Map toJson() { final data = super.toJson(); - if (user != null) data['user'] = user; data['password'] = password; data['identifier'] = identifier.toJson(); return data; diff --git a/lib/src/model/auth/authentication_three_pid_creds.dart b/lib/src/model/auth/authentication_three_pid_creds.dart index 2754b310..1df86aab 100644 --- a/lib/src/model/auth/authentication_three_pid_creds.dart +++ b/lib/src/model/auth/authentication_three_pid_creds.dart @@ -65,7 +65,7 @@ class AuthenticationThreePidCreds extends AuthenticationData { } class ThreepidCreds { -+ String sid; + String sid; String clientSecret; String idServer; String idAccessToken; diff --git a/test/matrix_api_test.dart b/test/matrix_api_test.dart index 064cef97..aa88acd1 100644 --- a/test/matrix_api_test.dart +++ b/test/matrix_api_test.dart @@ -1905,7 +1905,6 @@ void main() { AuthenticationPassword( session: '1', password: 'a', - user: 'a', identifier: AuthenticationUserIdentifier(user: 'a'), ).toJson(), json); @@ -1919,7 +1918,6 @@ void main() { AuthenticationPassword( session: '1', password: 'a', - user: 'a', identifier: AuthenticationThirdPartyIdentifier(medium: 'a', address: 'a'), ).toJson(), @@ -1934,7 +1932,6 @@ void main() { AuthenticationPassword( session: '1', password: 'a', - user: 'a', identifier: AuthenticationPhoneIdentifier(country: 'a', phone: 'a'), ).toJson(), json);