Implements Microsoft SSO using MSAL.js 3.27.0 (redirect flow) so only users in the specified Azure AD tenant can access the tool. Auth overlay shown on load; app revealed after successful login with user name and Sign out button in the header. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
49 lines
No EOL
1.6 KiB
PHP
49 lines
No EOL
1.6 KiB
PHP
<?php
|
|
// OMG Static - H&M Agent Configuration
|
|
// This file contains sensitive configuration data
|
|
// Should be placed outside web root or protected by Apache .htaccess
|
|
|
|
header('Content-Type: application/json');
|
|
|
|
// Prevent direct access if not called via AJAX
|
|
if (!isset($_SERVER['HTTP_X_REQUESTED_WITH']) || strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) !== 'xmlhttprequest') {
|
|
http_response_code(403);
|
|
exit('Access denied');
|
|
}
|
|
|
|
// Note: Session authentication is handled by auth.php in index.php
|
|
// No need to check session here since only authenticated users can reach index.php
|
|
|
|
// Configuration data
|
|
$config = [
|
|
'api' => [
|
|
'baseUrl' => 'https://oliver.one2edit.com/Api.php',
|
|
'authDomain' => 'local',
|
|
'authUsername' => 'OMGStaticSite',
|
|
'authPassword' => 'OMG-25!',
|
|
'clientId' => '6'
|
|
],
|
|
'assets' => [
|
|
'inddProjectId' => '7',
|
|
'pdfProjectId' => '10',
|
|
'inddFolderIdentifier' => '68cc028b0e3f4a98ed07db6c',
|
|
'ratioCheckFolderIdentifier' => '68e7b8a3e7f97c8f0e01d8b1',
|
|
'pdfFolderIdentifier' => '686fac43868b7ed49b028bee',
|
|
'pdfPresetId' => '6',
|
|
'hmSRGBLogoAsset' => '68626a50da85f5bf560161ed',
|
|
'hmCMYKLogoAsset' => '68626a4a0eb4d535b80789cb'
|
|
],
|
|
'performance' => [
|
|
'relinkDelay' => 5000,
|
|
'documentDelay' => 2000,
|
|
'statusCheckDelay' => 500
|
|
],
|
|
'azure' => [
|
|
'clientId' => '9079054c-9620-4757-a256-23413042f1ef',
|
|
'tenantId' => 'e519c2e6-bc6d-4fdf-8d9c-923c2f002385',
|
|
'redirectUri' => 'https://ai-sandbox.oliver.solutions/hm-o2e-tool'
|
|
]
|
|
];
|
|
|
|
echo json_encode($config);
|
|
?>
|