toJson method
Implementation
Map<String, dynamic> toJson() => {
'username': username,
'token': token,
'issueTime': issueTime,
'duration': duration.inSeconds,
'expireTime': expireTime,
if (refreshToken != null) 'refreshToken': refreshToken,
};