MCPcopy Create free account
hub / github.com/ElementsProject/elements / GetAuthCookie

Function GetAuthCookie

src/rpc/request.cpp:116–130  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

114}
115
116bool 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:

Callers 1

CallRPCFunction · 0.85

Calls 3

GetAuthCookieFileFunction · 0.85
openMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected