From 99a4bd23dadbdaf8e82ceca26af531c93d5fd4a6 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 9 Aug 2019 21:34:12 +0300 Subject: SL-9699 Login selection --- indra/newview/llsechandler_basic.h | 61 ++++++++++++++++++++++++++++++++++---- 1 file changed, 55 insertions(+), 6 deletions(-) (limited to 'indra/newview/llsechandler_basic.h') diff --git a/indra/newview/llsechandler_basic.h b/indra/newview/llsechandler_basic.h index c35617f564..426b5d392a 100644 --- a/indra/newview/llsechandler_basic.h +++ b/indra/newview/llsechandler_basic.h @@ -211,8 +211,9 @@ class LLSecAPIBasicCredential : public LLCredential public: LLSecAPIBasicCredential(const std::string& grid) : LLCredential(grid) {} virtual ~LLSecAPIBasicCredential() {} - // return a value representing the user id, (could be guid, name, whatever) - virtual std::string userID() const; + // return a value representing the user id, used for server and voice + // (could be guid, name in format "name_resident", whatever) + virtual std::string userID() const; // printible string identifying the credential. virtual std::string asString() const; @@ -246,7 +247,10 @@ public: // exists, it'll be loaded. If not, one will be created (but not // persisted) virtual LLPointer getCertificateStore(const std::string& store_id); - + + // protectedData functions technically should be pretected or private, + // they are not because of llsechandler_basic_test imlementation + // persist data in a protected store virtual void setProtectedData(const std::string& data_type, const std::string& data_id, @@ -259,19 +263,64 @@ public: // delete a protected data item from the store virtual void deleteProtectedData(const std::string& data_type, const std::string& data_id); - + + // persist data in a protected store's map + virtual void addToProtectedMap(const std::string& data_type, + const std::string& data_id, + const std::string& map_elem, + const LLSD& data); + + // remove data from protected store's map + virtual void removeFromProtectedMap(const std::string& data_type, + const std::string& data_id, + const std::string& map_elem); + // credential management routines virtual LLPointer createCredential(const std::string& grid, const LLSD& identifier, const LLSD& authenticator); - + + // load single credencial from default storage virtual LLPointer loadCredential(const std::string& grid); + // save credencial to default storage virtual void saveCredential(LLPointer cred, bool save_authenticator); virtual void deleteCredential(LLPointer cred); - + + // has map of credentials declared as specific storage + virtual bool hasCredentialMap(const std::string& storage, + const std::string& grid); + + // load map of credentials from specific storage + virtual void loadCredentialMap(const std::string& storage, + const std::string& grid, + credential_map_t& credential_map); + + // load single username from map of credentials from specific storage + virtual LLPointer loadFromCredentialMap(const std::string& storage, + const std::string& grid, + const std::string& userid); + + // add item to map of credentials from specific storage + virtual void addToCredentialMap(const std::string& storage, + LLPointer cred, + bool save_authenticator); + + // remove item from map of credentials from specific storage + virtual void removeFromCredentialMap(const std::string& storage, + LLPointer cred); + + // remove item from map of credentials from specific storage + virtual void removeFromCredentialMap(const std::string& storage, + const std::string& grid, + const std::string& userid); + + virtual void removeCredentialMap(const std::string& storage, + const std::string& grid); + + protected: void _readProtectedData(); void _writeProtectedData(); -- cgit v1.2.3 From 19caca91e98e41187f76c9925c31b8fba33c2902 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 7 Jan 2020 00:52:04 +0200 Subject: SL-12486 Better data deletion --- indra/newview/llsechandler_basic.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/newview/llsechandler_basic.h') diff --git a/indra/newview/llsechandler_basic.h b/indra/newview/llsechandler_basic.h index 426b5d392a..0bc7f5230f 100644 --- a/indra/newview/llsechandler_basic.h +++ b/indra/newview/llsechandler_basic.h @@ -293,6 +293,10 @@ public: virtual bool hasCredentialMap(const std::string& storage, const std::string& grid); + // returns true if map is empty or does not exist + virtual bool emptyCredentialMap(const std::string& storage, + const std::string& grid); + // load map of credentials from specific storage virtual void loadCredentialMap(const std::string& storage, const std::string& grid, -- cgit v1.2.3