famedlysdk/lib/src/utils/open_id_credentials.dart
2020-03-30 09:08:38 +00:00

30 lines
738 B
Dart

class OpenIdCredentials {
String accessToken;
String tokenType;
String matrixServerName;
num expiresIn;
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'];
}
Map<String, dynamic> toJson() {
var map = <String, dynamic>{};
final data = map;
data['access_token'] = accessToken;
data['token_type'] = tokenType;
data['matrix_server_name'] = matrixServerName;
data['expires_in'] = expiresIn;
return data;
}
}