English
php
csrf
security
framework
shinobi-apps-framework
CSRF protection in PHP without a framework: rotating tokens, grace periods, and the @csrf directive
How the Shinobi Apps framework implements CSRF protection: bin2hex(random_bytes(32)) tokens stored in session, 30-minute rotation with a 10-minute grace period for tabs left open, hash_equals() for timing-safe comparison, and an @csrf directive that outputs window.CSRF_TOKEN instead of a meta tag.