Practical examples demonstrating Phase 5 High-Level Orchestration Layer, including:
- Unified
handleAttempt()login flow - Automatic blocking
- Adaptive backoff
- Dynamic policy switching
- Multi-flow & multi-device detection
- Event dispatching
- Manual block & unblock
- Analytics-ready stats
- Slim / Laravel middleware & routes
- PRO simulations (botnets, distributed attacks, hijacking patterns)
All examples use only the Phase 5 public API:
handleAttempt()
isBlocked()
getRemainingBlockSeconds()
block()
unblock()
cleanup()
setConfig()
getConfig()
| Environment | Example Link |
|---|---|
| Native | native/bootstrap.php |
| Slim | slim/bootstrap.php |
| Laravel | laravel/bootstrap.php |
Each bootstrap:
- Loads Redis via
data-adapters - Creates full 9-parameter
SecurityConfigDTO - Creates
DefaultIdentifierStrategy - Initializes
SecurityGuardService - Applies config via
setConfig()
| Environment | Example |
|---|---|
| Native | native/example_basic.php |
| Slim | slim/example_basic.php |
| Laravel | laravel/example_basic.php |
| Environment | Example |
|---|---|
| Native | native/example_auto_block.php |
| Slim | slim/example_auto_block.php |
| Laravel | laravel/example_auto_block.php |
| Environment | Example |
|---|---|
| Native | native/example_reset_logic.php |
| Slim | slim/example_reset_logic.php |
| Laravel | laravel/example_reset_logic.php |
| Environment | Example |
|---|---|
| Native | native/example_custom_config.php |
| Slim | slim/example_custom_config.php |
| Laravel | laravel/example_custom_config.php |
| Environment | Example |
|---|---|
| Native | native/example_multi_flows.php |
| Slim | slim/example_multi_flows.php |
| Laravel | laravel/example_multi_flows.php |
| Environment | Example |
|---|---|
| Native | native/example_manual_block.php |
| Slim | slim/example_manual_block.php |
| Laravel | laravel/example_manual_block.php |
| Environment | Example |
|---|---|
| Native | native/example_events.php |
| Slim | slim/example_events.php |
| Laravel | laravel/example_events.php |
| Environment | Example |
|---|---|
| Slim | slim/example_middleware.php |
| Laravel | laravel/example_middleware.php |
| Environment | Example |
|---|---|
| Slim | slim/example_routes.php |
| Laravel | laravel/example_routes.php |
✔ Only Phase 5 public API
✔ DO NOT touch drivers
✔ DTO must include full 9 parameters
✔ resetAfter == windowSeconds()
✔ Always use setConfig() / getConfig()
✔ Events must be dispatched via dispatcher only
✔ No manual backoff, no custom counters
Install dependencies:
composer install
Run any native example:
php examples/phase5/native/example_basic.php
Run Slim:
php examples/phase5/slim/example_basic.php
Run Laravel Sim examples:
php examples/phase5/laravel/example_basic.php