| 108 | } |
| 109 | |
| 110 | bool GetAuthCookie(std::string *cookie_out) |
| 111 | { |
| 112 | std::ifstream file; |
| 113 | std::string cookie; |
| 114 | fs::path filepath = GetAuthCookieFile(); |
| 115 | file.open(filepath.string().c_str()); |
| 116 | if (!file.is_open()) |
| 117 | return false; |
| 118 | std::getline(file, cookie); |
| 119 | file.close(); |
| 120 | |
| 121 | if (cookie_out) |
| 122 | *cookie_out = cookie; |
| 123 | return true; |
| 124 | } |
| 125 | |
| 126 | void DeleteAuthCookie() |
| 127 | { |
no test coverage detected