sessions method
Every live session of the signed-in person on this tenant, newest sign-in first, with this device's marked current. The server answers for the person this session belongs to and nobody else.
Implementation
Future<List<DVSession>> sessions() async {
const String path = DVAuthEndpoints.sessionsPath;
final Map<String, Object?> json =
_decode(await _request('GET', path, bearer: _token), path);
final Object? listed = json['sessions'];
if (listed is! List) throw const DVSessionRequestFailed(200, path);
return <DVSession>[
for (final Object? s in listed)
if (s is Map) DVSession.fromJson(Map<String, Object?>.from(s)),
];
}