MCPcopy Create free account
hub / github.com/LUX-Core/lux / GetAuthCookie

Function GetAuthCookie

src/rpcprotocol.cpp:105–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

103}
104
105bool GetAuthCookie(std::string *cookie_out)
106{
107 std::ifstream file;
108 std::string cookie;
109 boost::filesystem::path filepath = GetAuthCookieFile();
110 file.open(filepath.string().c_str());
111 if (!file.is_open())
112 return false;
113 std::getline(file, cookie);
114 file.close();
115
116 if (cookie_out)
117 *cookie_out = cookie;
118 return true;
119}
120
121void DeleteAuthCookie()
122{

Callers 1

CallRPCFunction · 0.85

Calls 3

GetAuthCookieFileFunction · 0.85
openMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected