certimine/config/config.example.php
remaster 84e94dcb55 seguridad: token DC3 vía env, config o config/token.php (gitignored)
- Elimina lectura del token desde DatosPdf; nuevo token.example.php y token.php ignorado.
- DatosPdf.txt deja de versionarse; docs/DatosPdf.example.txt con TOKEN redactado.
- Ajusta README, docs API, i18n y banderolas de consulta/diagnóstico previos.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-13 18:49:11 -06:00

70 lines
2.5 KiB
PHP

<?php
/**
* Copiar a config.php y ajustar. config.php está en .gitignore.
*
* Token DC3: ver orden en PenasquitoDc3Api::resolvedToken() (env → config → config/token.php).
*/
return [
'app' => [
'name' => 'CertiMine',
'base_path' => dirname(__DIR__),
'public_url' => 'http://127.0.0.1:8080',
'timezone' => 'America/Mexico_City',
'qr_secret' => 'change-me-qr-hmac',
'qr_enforce' => false,
'debug' => false,
],
'db' => [
'host' => '127.0.0.1',
'port' => 3306,
'name' => 'certimine',
'user' => 'root',
'pass' => 'R3m4st3r',
'charset' => 'utf8mb4',
],
'session' => [
'name' => 'CERTIMINESESSID',
'cookie_lifetime' => 0,
'cookie_secure' => false,
'cookie_httponly' => true,
'cookie_samesite' => 'Lax',
],
/**
* API REST expuesto por el backend Peñasquito (Wotbi): competencias DC3 por passport.
* Origen: DatosPdf.txt / documentación de scraping Mobilise-Me.
*/
'penasquito_dc3' => [
'base_url' => 'https://penasquito.wotbi.com',
'static_token' => '',
'search_path' => '/api/v1/dc3/competencies/passports/search/',
'result_path_template' => '/api/v1/dc3/competencies/passports/result/{ticket_id}/',
'status_path' => '/api/v1/dc3/competencies/passports/status/',
'authorization_header' => 'Authorization',
'authorization_scheme' => 'Token ',
'poll_interval_seconds' => 2,
'poll_max_attempts' => 20,
'timeout_seconds' => 45,
],
/**
* Modo legacy (JSON login + JWT) si NO usas penasquito_dc3.static_token / CERTIMINE_DC3_TOKEN.
*/
'mobiliseme' => [
'base_url' => 'https://api.mobiliseme.example',
'timeout_seconds' => 20,
'mock' => true,
'login_path' => '/auth/login',
'login_username_field' => 'username',
'login_password_field' => 'password',
'token_json_path' => 'access_token',
'authorization_header' => 'Authorization',
'authorization_scheme' => 'Bearer ',
'profile_path' => '/me',
'profile_external_id_path' => 'id',
'profile_name_path' => 'full_name',
'profile_type_path' => 'type',
'profile_employee_number_path' => 'employee_number',
'person_certificates_path' => '/persons/{id}/certificates',
'certificate_list_path' => 'items',
'webhook_secret' => '',
],
];