← Back to the chapter · Next detail →

Technical detail · NFC IoT System Integration

Reader-to-policy bridge

The bridge receives tag input, reader context and an authenticated session. It records validation failures or policy decisions before choosing execution or fallback. This short sketch shows that boundary; the surrounding action path must also record the observed result for release evidence.

def handle_tap(tag, reader, session): decoded = decode_ndef_or_uid(tag) event = build_tap_event(decoded, reader, session) if not event.validation.ok: audit("tap_rejected", event) return fallback("manual_lookup") decision = policy_service.evaluate(event) audit("tap_decision", event, decision) if decision.allowed: return execute_idempotent_action(decision.action) return fallback(decision.fallback)

← Back to the chapter · Next detail →