revoke method
- String? deviceId
override
Closes every connection of deviceId (every device when null) with 4012 and revokes
their sessions.
Implementation
@override
void revoke(String? deviceId) {
final sessions = world.sessions.values
.where(
(s) => !s.revoked && (deviceId == null || s.deviceId == deviceId),
)
.toList();
for (final s in sessions) {
// 04 8.5: the connections close at once with 4012; the event follows in the log.
for (final c in _open.where((c) => c.sessionId == s.id)) {
_close(c, 4012, 'revoked');
}
world.revokeSession(s.id);
}
}