Files
Php-Template/config.php
Ron Rise 13445a0719
All checks were successful
🧪✨ Tests Workflow / 🛡️ 🔒 Library Audit (push) Successful in 2m50s
🧪✨ Tests Workflow / 📝 ✨ Code Lint (push) Successful in 2m41s
🧪✨ Tests Workflow / 🛡️ 🔒 License Check (push) Successful in 3m8s
🧪✨ Tests Workflow / 🧪 ✨ Database Migrations (push) Successful in 3m22s
🧪✨ Tests Workflow / 🐙 🔍 Code Sniffer (push) Successful in 3m5s
🧪✨ Tests Workflow / 🧪 ✅ Unit Tests (push) Successful in 1m41s
feat: implement JWT authentication and scope validation middleware (#11)
Reviewed-on: #11
Co-authored-by: Ron Rise <ron@siteworxpro.com>
Co-committed-by: Ron Rise <ron@siteworxpro.com>
2025-11-07 17:14:22 +00:00

53 lines
1.6 KiB
PHP

<?php
use Siteworxpro\App\Helpers\Env;
return [
/**
* The server configuration.
*/
'server' => [
'port' => Env::get('HTTP_PORT', 9501, 'int'),
'dev_mode' => Env::get('DEV_MODE', false, 'bool'),
],
/**
* The database configuration.
*/
'db' => [
'driver' => Env::get('DB_DRIVER', 'pgsql'),
'host' => Env::get('DB_HOST', 'localhost'),
'database' => Env::get('DB_DATABASE', 'siteworxpro'),
'username' => Env::get('DB_USERNAME', 'siteworxpro'),
'password' => Env::get('DB_PASSWORD', 'password'),
'port' => Env::get('DB_PORT', 5432, 'int'),
'charset' => Env::get('DB_CHARSET', 'utf8'),
'collation' => Env::get('DB_COLLATION', 'utf8_unicode_ci'),
'prefix' => Env::get('DB_PREFIX', ''),
'options' => [
// Add any additional PDO options here
],
],
'cors' => [
'allowed_origins' => Env::get('CORS_ALLOWED_ORIGINS', 'localhost:3000'),
'allow_credentials' => Env::get('CORS_ALLOW_CREDENTIALS', true, 'bool'),
'max_age' => Env::get('CORS_MAX_AGE', ''),
],
'redis' => [
'host' => Env::get('REDIS_HOST', 'localhost'),
'port' => Env::get('REDIS_PORT', 6379, 'int'),
'database' => Env::get('REDIS_DATABASE', 0, 'int'),
'password' => Env::get('REDIS_PASSWORD'),
],
'jwt' => [
'signing_key' => Env::get('JWT_SIGNING_KEY', 'a_super_secret_key'),
'audience' => Env::get('JWT_AUDIENCE', 'my_audience'),
'issuer' => Env::get('JWT_ISSUER', 'my_issuer'),
'strict_validation' => Env::get('JWT_STRICT_VALIDATION', true, 'bool'),
]
];