Ring Daemon 16.0.0
|
#include <server_account_manager.h>
Classes | |
struct | ServerAccountCredentials |
Public Member Functions | |
bool | changePassword (const std::string &, const std::string &) override |
void | initAuthentication (PrivateKey request, std::string deviceName, std::unique_ptr< AccountCredentials > credentials, AuthSuccessCallback onSuccess, AuthFailureCallback onFailure, const OnChangeCallback &onChange) override |
void | onNeedsMigration (std::function< void()> cb) |
void | registerName (const std::string &name, std::string_view scheme, const std::string &password, RegistrationCallback cb) override |
bool | revokeDevice (const std::string &device, std::string_view scheme, const std::string &password, RevokeDeviceCallback cb) override |
bool | searchUser (const std::string &query, SearchCallback cb) override |
ServerAccountManager (const std::string &accountId, const std::filesystem::path &path, const std::string &managerHostname, const std::string &nameServer) | |
void | syncBlueprintConfig (SyncBlueprintCallback onSuccess) |
void | syncDevices () override |
![]() | |
bool | acceptTrustRequest (const std::string &from, bool includeConversation=true) |
AccountManager (const std::string &accountId, const std::filesystem::path &path, const std::string &nameServer) | |
bool | addContact (const dht::InfoHash &uri, bool confirmed=false, const std::string &conversationId="") |
Add contact to the account contact list. | |
virtual int32_t | addDevice (const std::string &, std::string_view, AuthChannelHandler *) |
Initiates the process of adding a new device to the account. | |
CertRequest | buildRequest (PrivateKey fDeviceKey) |
virtual bool | cancelAddDevice (uint32_t) |
dhtnet::tls::CertificateStore & | certStore () const |
virtual bool | confirmAddDevice (uint32_t) |
bool | discardTrustRequest (const std::string &from) |
virtual bool | findCertificate (const dht::InfoHash &h, std::function< void(const std::shared_ptr< dht::crypto::Certificate > &)> &&cb={}) |
virtual bool | findCertificate (const dht::PkId &h, std::function< void(const std::shared_ptr< dht::crypto::Certificate > &)> &&cb={}) |
void | forEachDevice (const dht::InfoHash &to, std::function< void(const std::shared_ptr< dht::crypto::PublicKey > &)> &&op, std::function< void(bool)> &&end={}) |
bool | foundAccountDevice (const std::shared_ptr< dht::crypto::Certificate > &crt, const std::string &name={}, const time_point &last_sync=time_point::min()) |
std::string | getAccountDeviceName () const |
std::vector< std::string > | getCertificatesByStatus (dhtnet::tls::TrustStore::PermissionStatus status) |
dhtnet::tls::TrustStore::PermissionStatus | getCertificateStatus (const std::string &cert_id) const |
std::map< std::string, std::string > | getContactDetails (const std::string &uri) const |
Obtain details about one account contact in serializable form. | |
std::optional< Contact > | getContactInfo (const std::string &uri) const |
std::vector< std::map< std::string, std::string > > | getContacts (bool includeRemoved=false) const |
const AccountInfo * | getInfo () const |
const std::map< dht::PkId, KnownDevice > & | getKnownDevices () const |
virtual std::vector< uint8_t > | getPasswordKey (const std::string &) |
std::vector< std::map< std::string, std::string > > | getTrustRequests () const |
bool | isAllowed (const crypto::Certificate &crt, bool allowPublic=false) |
virtual bool | isPasswordValid (const std::string &) |
dht::crypto::Identity | loadIdentity (const std::string &crt_path, const std::string &key_path, const std::string &key_pwd) const |
virtual void | lookupAddress (const std::string &address, LookupCallback cb) |
virtual void | lookupUri (const std::string &name, const std::string &defaultServer, LookupCallback cb) |
bool | onPeerCertificate (const std::shared_ptr< dht::crypto::Certificate > &crt, bool allowPublic, dht::InfoHash &account_id) |
void | onPeerMessage (const dht::crypto::PublicKey &peer_device, bool allowPublic, PeerCertificateCb &&cb) |
virtual void | onSyncData (DeviceSync &&device, bool checkDevice=true) |
void | reloadContacts () |
void | removeContact (const std::string &uri, bool banned=true) |
void | removeContactConversation (const std::string &uri) |
void | sendTrustRequest (const std::string &to, const std::string &convId, const std::vector< uint8_t > &payload) |
void | sendTrustRequestConfirm (const dht::InfoHash &to, const std::string &conversationId) |
void | setAccountDeviceName (const std::string &name) |
bool | setCertificateStatus (const std::shared_ptr< crypto::Certificate > &cert, dhtnet::tls::TrustStore::PermissionStatus status, bool local=true) |
bool | setCertificateStatus (const std::string &cert_id, dhtnet::tls::TrustStore::PermissionStatus status) |
void | setDht (const std::shared_ptr< dht::DhtRunner > &dht) |
virtual void | startSync (const OnNewDeviceCb &cb, const OnDeviceAnnouncedCb &dcb, bool publishPresence=true) |
void | updateContactConversation (const std::string &uri, const std::string &convId) |
const AccountInfo * | useIdentity (const dht::crypto::Identity &id, const std::string &receipt, const std::vector< uint8_t > &receiptSignature, const std::string &username, const OnChangeCallback &onChange) |
virtual | ~AccountManager () |
Additional Inherited Members | |
![]() | |
static bool | foundPeerDevice (const std::string &accoundId, const std::shared_ptr< dht::crypto::Certificate > &crt, dht::InfoHash &account_id) |
Inform that a potential peer device have been found. | |
static std::shared_ptr< dht::Value > | parseAnnounce (const std::string &announceBase64, const std::string &accountId, const std::string &deviceSha1, const std::string &deviceSha256) |
![]() | |
static constexpr const char *const | DHT_TYPE_NS = "cx.ring" |
![]() | |
const std::string | accountId_ |
std::shared_ptr< dht::DhtRunner > | dht_ |
std::unique_ptr< AccountInfo > | info_ |
std::reference_wrapper< NameDirectory > | nameDir_ |
OnChangeCallback | onChange_ |
const std::filesystem::path | path_ |
Definition at line 27 of file server_account_manager.h.
using jami::ServerAccountManager::SyncBlueprintCallback = std::function<void(const std::map<std::string, std::string>& config)> |
Definition at line 56 of file server_account_manager.h.
jami::ServerAccountManager::ServerAccountManager | ( | const std::string & | accountId, |
const std::filesystem::path & | path, | ||
const std::string & | managerHostname, | ||
const std::string & | nameServer | ||
) |
Definition at line 49 of file server_account_manager.cpp.
|
inlineoverridevirtual |
Implements jami::AccountManager.
Definition at line 48 of file server_account_manager.h.
|
overridevirtual |
Implements jami::AccountManager.
Definition at line 64 of file server_account_manager.cpp.
References jami::AccountManager::accountId_, jami::AccountManager::buildRequest(), jami::base64::decode(), jami::emitSignal(), jami::NameDirectory::instance(), jami::Manager::instance(), jami::AccountManager::INVALID_ARGUMENTS, JAMI_DEBUG, JAMI_ERR, JAMI_ERROR, JAMI_WARNING, jami::AccountManager::NETWORK, jami::AccountManager::onChange_, jami::AccountManager::parseAnnounce(), jami::PATH_DEVICE, jami::AccountManager::SERVER_ERROR, and libjami::Account::ConfProperties::RingNS::URI.
Definition at line 72 of file server_account_manager.h.
References jami::emitSignal().
|
overridevirtual |
Implements jami::AccountManager.
Definition at line 640 of file server_account_manager.cpp.
|
overridevirtual |
Reimplemented from jami::AccountManager.
Definition at line 600 of file server_account_manager.cpp.
References JAMI_DEBUG, JAMI_ERROR, JAMI_WARNING, and jami::PATH_DEVICE.
|
overridevirtual |
Reimplemented from jami::AccountManager.
Definition at line 646 of file server_account_manager.cpp.
References JAMI_DEBUG, JAMI_ERROR, JAMI_WARNING, and jami::PATH_SEARCH.
void jami::ServerAccountManager::syncBlueprintConfig | ( | SyncBlueprintCallback | onSuccess | ) |
Definition at line 569 of file server_account_manager.cpp.
References JAMI_DEBUG, JAMI_ERROR, and jami::PATH_BLUEPRINT.
|
overridevirtual |
Implements jami::AccountManager.
Definition at line 393 of file server_account_manager.cpp.
References jami::SyncMsg::c, JAMI_DEBUG, JAMI_ERROR, JAMI_WARNING, jami::PATH_CONTACTS, jami::PATH_CONVERSATIONS, jami::PATH_CONVERSATIONS_REQUESTS, and jami::PATH_DEVICES.