- Portal bilingüe (Bootstrap), biblioteca FRM, consulta y perfiles con QR. - Integración REST penasquito.wotbi.com (Token, búsqueda por passport y polling). - Webhook de sincronización, esquema MariaDB y semillas FRM/NOM. - Documentación en docs/ y extracto DatosPdf.txt; ejemplo de config sin secretos locales. Co-authored-by: Cursor <cursoragent@cursor.com>
69 lines
2.5 KiB
PHP
69 lines
2.5 KiB
PHP
<?php
|
|
/**
|
|
* Copiar a config.php y ajustar. config.php está en .gitignore.
|
|
*
|
|
* Token DC3: preferir variable de entorno CERTIMINE_DC3_TOKEN (no commitear el valor real).
|
|
*/
|
|
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,
|
|
],
|
|
'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' => '',
|
|
],
|
|
];
|