wsj-filenaming/config.php
Vadym Samoilenko 523be058aa Add Azure AD / MSAL SSO authentication
- config.php: Azure tenant/client constants, SSO_ENABLED = true
- auth.php: requireAuth() middleware, getSafeUser(), getUserDataFile()
- auth_gate.php: MSAL.js PKCE login flow, stores return URL in sessionStorage
- logout.php: destroys PHP session + calls msalInstance.logoutRedirect()
- api.php: public create_session endpoint (JWT validation), 401 guard on all other actions, per-user data files (data_{safeUser}.json)
- sheet_helpers.php: fix dot sanitisation '_' → '_dot_' to match getSafeUser()
- index/builder/help.php: requireAuth() at top, user email + Sign Out in header

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-02 21:43:32 +00:00

12 lines
423 B
PHP

<?php
// API Configuration
$GEMINI_API_KEY = 'AIzaSyBq2hdp5kh1PjXJ8Kz3-k5t5Kco6XHuQBI';
// Azure AD / SSO Configuration
define('AZURE_TENANT_ID', 'e519c2e6-bc6d-4fdf-8d9c-923c2f002385');
define('AZURE_CLIENT_ID', '9079054c-9620-4757-a256-23413042f1ef');
define('AZURE_REDIRECT_URI', 'https://ai-sandbox.oliver.solutions/wsj-filenaming');
$SSO_ENABLED = true;
// $CURRENT_USER is set by requireAuth() in auth.php
?>