toJson method

Map<String, dynamic> toJson()

Returns a Map containing data of these Credentials.

Implementation

Map<String, dynamic> toJson() {
  return {
    'access': {
      'secret': access.secret.val,
      'expireAt': access.expireAt.toString(),
    },
    'refresh': {
      'secret': refresh.secret.val,
      'expireAt': refresh.expireAt.toString(),
    },
    'sessionId': sessionId.val,
    'userId': userId.val,
  };
}