feat(Production): Complete production deployment infrastructure

- Add comprehensive health check system with multiple endpoints
- Add Prometheus metrics endpoint
- Add production logging configurations (5 strategies)
- Add complete deployment documentation suite:
  * QUICKSTART.md - 30-minute deployment guide
  * DEPLOYMENT_CHECKLIST.md - Printable verification checklist
  * DEPLOYMENT_WORKFLOW.md - Complete deployment lifecycle
  * PRODUCTION_DEPLOYMENT.md - Comprehensive technical reference
  * production-logging.md - Logging configuration guide
  * ANSIBLE_DEPLOYMENT.md - Infrastructure as Code automation
  * README.md - Navigation hub
  * DEPLOYMENT_SUMMARY.md - Executive summary
- Add deployment scripts and automation
- Add DEPLOYMENT_PLAN.md - Concrete plan for immediate deployment
- Update README with production-ready features

All production infrastructure is now complete and ready for deployment.
This commit is contained in:
2025-10-25 19:18:37 +02:00
parent caa85db796
commit fc3d7e6357
83016 changed files with 378904 additions and 20919 deletions

View File

@@ -0,0 +1,48 @@
<?php
declare(strict_types=1);
use App\Framework\OAuth\ValueObjects\RefreshToken;
describe('RefreshToken Value Object', function () {
it('creates valid refresh token', function () {
$token = RefreshToken::create('valid_refresh_token_1234567890');
expect($token->toString())->toBe('valid_refresh_token_1234567890');
});
it('rejects empty token', function () {
RefreshToken::create('');
})->throws(\InvalidArgumentException::class, 'Refresh token cannot be empty');
it('rejects too short token', function () {
RefreshToken::create('short');
})->throws(\InvalidArgumentException::class, 'Refresh token appears invalid (too short)');
it('masks token for logging', function () {
$token = RefreshToken::create('1234567890abcdefghijklmnop');
$masked = $token->getMasked();
expect($masked)->toStartWith('1234');
expect($masked)->toEndWith('mnop');
expect($masked)->toContain('*');
expect(strlen($masked))->toBe(strlen('1234567890abcdefghijklmnop'));
});
it('fully masks very short tokens', function () {
$token = RefreshToken::create('short_token_');
$masked = $token->getMasked();
expect($masked)->toBe('************');
expect(str_contains($masked, 's'))->toBeFalse();
expect(str_contains($masked, '_'))->toBeFalse();
});
it('converts to string as masked', function () {
$token = RefreshToken::create('1234567890abcdefghijklmnop');
expect((string) $token)->toBe($token->getMasked());
});
});