[#GenerateAuthCookie]
= GenerateAuthCookie
:mrdocs:

Generate a new RPC authentication cookie and write it to disk

== Synopsis

Declared in `&lt;rpc&sol;request&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:AuthCookieResult.adoc[AuthCookieResult]
GenerateAuthCookie(
    std::optional&lt;fs::perms&gt; const& cookie&lowbar;perms,
    std::string& user,
    std::string& pass);
----

== Return Value

Whether the cookie was generated, disabled, or failed&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *cookie&lowbar;perms* [in]
| Filesystem permissions to use for the cookie file&period;
| *user* [out]
| Generated username, only set if `OK` is returned&period;
| *pass* [out]
| Generated password, only set if `OK` is returned&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
