1#ifndef LIBFILEZILLA_IMPERSONATION_HEADER
2#define LIBFILEZILLA_IMPERSONATION_HEADER
22class impersonation_token_impl;
55 return impl_.operator
bool();
58 bool operator==(impersonation_token
const&)
const;
59 bool operator<(impersonation_token
const&)
const;
72 std::
unique_ptr<impersonation_token_impl> impl_;
89struct hash<
fz::impersonation_token>
Impersonation tokens for a given user can be used to spawn processes running as that user.
Definition impersonation.hpp:33
impersonation_token(fz::native_string const &username, fz::native_string const &password, bool drop_admin_privileges=true)
Creates an impersonation token, verifying credentials in the proceess.
fz::native_string home() const
Returns home directory, may be empty.
fz::native_string username() const
Returns the name of the impersonated user.
std::size_t hash() const noexcept
For std::hash.
The namespace used by libfilezilla.
Definition apply.hpp:17
native_string current_username()
Returns the username the calling thread is running under.
std::wstring native_string
A string in the system's native character type and encoding. Note: This typedef changes depending on...
Definition string.hpp:34
bool dispatch(event_base const &ev, F &&f)
Dispatch for simple_event<> based events to simple functors.
Definition event_handler.hpp:199
bool operator==(symmetric_key const &lhs, symmetric_key const &rhs)
Side-channel safe comparison.
String types and assorted functions.