class Validator { public static function isValidTokenFormat($token) { return preg_match('/^[A-Za-z0-9\-_]{32,}$/', $token); } public static function isTokenExpired($expirationDate) { return strtotime($expirationDate) < time(); } public static function isValidScope($scope, $allowedScopes) { return in_array($scope, $allowedScopes); } public static function isValidWhitelabelId($whitelabelId) { return is_numeric($whitelabelId) && $whitelabelId > 0; } }