| 114 | } |
| 115 | |
| 116 | bool GetAuthCookie(std::string *cookie_out) |
| 117 | { |
| 118 | std::ifstream file; |
| 119 | std::string cookie; |
| 120 | fs::path filepath = GetAuthCookieFile(); |
| 121 | file.open(filepath); |
| 122 | if (!file.is_open()) |
| 123 | return false; |
| 124 | std::getline(file, cookie); |
| 125 | file.close(); |
| 126 | |
| 127 | if (cookie_out) |
| 128 | *cookie_out = cookie; |
| 129 | return true; |
| 130 | } |
| 131 | |
| 132 | // |
| 133 | // ELEMENTS: |
no test coverage detected