platform/lib/src/response.dart

12 lines
362 B
Dart
Raw Normal View History

2017-09-29 02:16:44 +00:00
class AuthorizationCodeResponse {
final String accessToken;
final String refreshToken;
const AuthorizationCodeResponse(this.accessToken, {this.refreshToken});
Map<String, String> toJson() {
var map = <String, String> {'access_token': accessToken};
if (refreshToken?.isNotEmpty == true) map['refresh_token'] = refreshToken;
return map;
}
}