ferrero-naming-tool/config.example.php
DJP 1fda7b3ae2 fix: Add OAuth client credentials support for mTLS V2 Hybrid
The DAM OAuth endpoint requires both certificate authentication AND
client credentials (client_id + client_secret). Updated:

- Added DAM_CLIENT_ID and DAM_CLIENT_SECRET to .env.example
- Added client_id and client_secret to config.example.php
- Updated DamClient.php to include credentials in OAuth request
- Added validation for client credentials

This is mTLS V2 Hybrid mode: certificate + client credentials.
2025-11-29 11:30:23 -05:00

45 lines
1.5 KiB
PHP

<?php
/**
* Ferrero Naming Convention Tool - Database Configuration
*
* Copy this file to config.php and update with your database credentials
* DO NOT commit config.php to version control
*/
// Load environment variables from .env file
require_once __DIR__ . '/public-v2/env_loader.php';
return [
'database' => [
'host' => getenv('DB_HOST') ?: 'localhost',
'port' => getenv('DB_PORT') ?: '5433',
'dbname' => getenv('DB_NAME') ?: 'ferrero_tracking',
'user' => getenv('DB_USER') ?: 'ferrero_user',
'password' => getenv('DB_PASSWORD') ?: 'ferrero_pass_2025',
'charset' => 'utf8',
'options' => [
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
PDO::ATTR_EMULATE_PREPARES => false,
]
],
// DAM API Configuration (mTLS V2 Authentication)
// All values should be set in .env file
'dam' => [
'base_url' => getenv('DAM_BASE_URL') ?: '',
'mtls_oauth_url' => getenv('DAM_MTLS_OAUTH_URL') ?: '',
'mtls_cert_path' => getenv('DAM_MTLS_CERT_PATH') ?: '',
'mtls_cert_password' => getenv('DAM_MTLS_CERT_PASSWORD') ?: '',
'client_id' => getenv('DAM_CLIENT_ID') ?: '',
'client_secret' => getenv('DAM_CLIENT_SECRET') ?: '',
'timeout' => 30
],
// SSO Configuration (if applicable)
'sso' => [
'enabled' => getenv('SSO_ENABLED') === 'true',
'tenant_id' => getenv('SSO_TENANT_ID') ?: '',
'client_id' => getenv('SSO_CLIENT_ID') ?: ''
]
];