famedlysdk/lib/src/utils/open_id_credentials.dart

29 lines
763 B
Dart
Raw Normal View History

2020-01-12 10:30:05 +00:00
class OpenIdCredentials {
String accessToken;
String tokenType;
String matrixServerName;
2020-02-03 09:45:33 +00:00
num expiresIn;
2020-01-12 10:30:05 +00:00
OpenIdCredentials(
{this.accessToken,
this.tokenType,
this.matrixServerName,
this.expiresIn});
OpenIdCredentials.fromJson(Map<String, dynamic> json) {
accessToken = json['access_token'];
tokenType = json['token_type'];
matrixServerName = json['matrix_server_name'];
expiresIn = json['expires_in'];
}
2020-02-03 09:45:33 +00:00
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = Map<String, dynamic>();
data['access_token'] = this.accessToken;
data['token_type'] = this.tokenType;
data['matrix_server_name'] = this.matrixServerName;
data['expires_in'] = this.expiresIn;
return data;
}
2020-01-12 10:30:05 +00:00
}