ingestRemoteRevocation method
Future<void>
ingestRemoteRevocation({
- required String tenantId,
- required RevocationReason reason,
Ingests a remote revocation signal for tenantId, terminating the
session and notifying all registered revocation listeners.
Implementation
Future<void> ingestRemoteRevocation({
required String tenantId,
required RevocationReason reason,
}) async {
if (_currentScope?.id == tenantId || _migrationScope?.id == tenantId) {
await signOut();
} else {
await _manager.endScopeAsync(tenantId);
}
for (final listener in List.of(_revocationListeners)) {
try {
listener(reason);
} catch (_) {}
}
}