| 149 | } |
| 150 | |
| 151 | bool GetMainchainAuthCookie(std::string *cookie_out) |
| 152 | { |
| 153 | std::ifstream file; |
| 154 | std::string cookie; |
| 155 | |
| 156 | std::filesystem::path filepath = GetMainchainAuthCookieFile(); |
| 157 | file.open(filepath); |
| 158 | if (!file.is_open()) |
| 159 | return false; |
| 160 | std::getline(file, cookie); |
| 161 | file.close(); |
| 162 | |
| 163 | if (cookie_out) |
| 164 | *cookie_out = cookie; |
| 165 | return true; |
| 166 | } |
| 167 | |
| 168 | // END ELEMENTS |
| 169 | // |
no test coverage detected