fix: Make type in AuthenticationData nullable
It seems that there is a problem in the matrix Spec according to this. the Spec says that the type is required and session is nullable. But for using this endpoint: https://spec.matrix.org/unstable/client-server-api/#client-behaviour-1-1 We need to send an auth object which only contains the session. We should file an issue at the spec and ask there for more information. Currently we should make type nullable as well because otherwise this would break uiaRequests in the app for SSO.
This commit is contained in:
parent
d16c83f5db
commit
5e06721639
|
|
@ -22,10 +22,10 @@
|
|||
*/
|
||||
|
||||
class AuthenticationData {
|
||||
String type;
|
||||
String? type;
|
||||
String? session;
|
||||
|
||||
AuthenticationData({required this.type, this.session});
|
||||
AuthenticationData({this.type, this.session});
|
||||
|
||||
AuthenticationData.fromJson(Map<String, dynamic> json)
|
||||
: type = json['type'],
|
||||
|
|
@ -33,7 +33,7 @@ class AuthenticationData {
|
|||
|
||||
Map<String, dynamic> toJson() {
|
||||
final data = <String, dynamic>{};
|
||||
data['type'] = type;
|
||||
if (type != null) data['type'] = type;
|
||||
if (session != null) data['session'] = session;
|
||||
return data;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue