<?php
/**
 * Authentication Configuration
 * All authentication related settings in one place
 */

// OneSignal Configuration
$GLOBALS['ONESIGNAL_APP_ID'] = '72ba2647-511f-4705-bb59-002d81487007';
$GLOBALS['ONESIGNAL_REST_API_KEY'] = 'os_v2_app_ok5cmr2rd5dqlo2zaawycsdqa7jm7s43o3wubvnopssgdfewvuqll3ude4wv2wrlrfeqgw4j6qbpgedpet6bpu2g2dhzk3lem6bf7yi';
$GLOBALS['ONESIGNAL_OTP_EXPIRY'] = 300; // 5 minutes

// JWT Configuration
$GLOBALS['JWT_SECRET'] = '72ba2647-511f-4705-bb59-002d81487007-urban-halal-jwt-secret';
$GLOBALS['JWT_EXPIRY'] = 60 * 60 * 24; // 24 hours

// Rate Limiting Configuration
$GLOBALS['OTP_RATE_LIMIT'] = 3; // Number of OTP requests allowed
$GLOBALS['OTP_RATE_WINDOW'] = 300; // Time window in seconds (5 minutes)

// OTP Configuration
$GLOBALS['OTP_EXPIRY'] = 300; // OTP expiry time in seconds (5 minutes)
$GLOBALS['OTP_LENGTH'] = 6; // Length of OTP code

// Email Configuration
$GLOBALS['EMAIL_FROM_NAME'] = 'Urban Halal';
$GLOBALS['EMAIL_FROM_ADDRESS'] = 'noreply@urbanhalal.com';

// Database Configuration
$GLOBALS['DB_OTP_TABLE'] = 'cmsb_otp_verification';
$GLOBALS['DB_MEMBERS_TABLE'] = 'cmsb_members';

// Security Configuration
$GLOBALS['PASSWORD_HASH_ALGO'] = PASSWORD_BCRYPT;
$GLOBALS['PASSWORD_HASH_OPTIONS'] = ['cost' => 12];




// API Settings
$API_VERSION = '1.0';
$API_RATE_LIMIT = 100;      // Requests per minute
$API_RATE_WINDOW = 60;      // Time window in seconds

// Debug Settings
$DEBUG_MODE = true;
$LOG_LEVEL = 'debug';       // debug, info, warning, error

// Session Settings
$SESSION_LIFETIME = 86400;  // 24 hours in seconds
$SESSION_SECURE = false;    // Set to true in production
$SESSION_HTTPONLY = true;

// Cache Settings
$CACHE_ENABLED = true;
$CACHE_LIFETIME = 3600;     // 1 hour in seconds

