GenerateAuthCookie

Generate a new RPC authentication cookie and write it to disk

Synopsis

Declared in <rpc/request.h>

AuthCookieResult
GenerateAuthCookie(
    std::optional<fs::perms> const& cookie_perms,
    std::string& user,
    std::string& pass);

Return Value

Whether the cookie was generated, disabled, or failed.

Parameters

NameDescription
cookie_perms [in]Filesystem permissions to use for the cookie file.
user [out]Generated username, only set if OK is returned.
pass [out]Generated password, only set if OK is returned.