diff options
author | Matthias Schiffer <matthias@gamezock.de> | 2009-09-27 19:58:24 +0200 |
---|---|---|
committer | Matthias Schiffer <matthias@gamezock.de> | 2009-09-27 19:58:24 +0200 |
commit | b40ba0cf91603b695f1f2380cbd39966a458f22f (patch) | |
tree | 1fec48ddc59eb1392fac38495b230e4b2cbf7528 /src/Common/AuthManager.cpp | |
parent | e1d8490f0654a3da0b900407d80d91d8d0da68c8 (diff) | |
download | mad-b40ba0cf91603b695f1f2380cbd39966a458f22f.tar mad-b40ba0cf91603b695f1f2380cbd39966a458f22f.zip |
Use Unicode-aware String class instead of std::string
Diffstat (limited to 'src/Common/AuthManager.cpp')
-rw-r--r-- | src/Common/AuthManager.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/Common/AuthManager.cpp b/src/Common/AuthManager.cpp index 38ac9e3..5e97fb3 100644 --- a/src/Common/AuthManager.cpp +++ b/src/Common/AuthManager.cpp @@ -48,7 +48,7 @@ void AuthManager::registerBackend(boost::shared_ptr<AuthBackend> backend) { void AuthManager::unregisterBackend(boost::shared_ptr<AuthBackend> backend) { boost::lock_guard<boost::shared_mutex> lock(mutex); - std::map<std::string, boost::shared_ptr<AuthBackend> >::iterator backendIt = backends.find(backend->getMethodName()); + std::map<Core::String, boost::shared_ptr<AuthBackend> >::iterator backendIt = backends.find(backend->getMethodName()); if(backendIt == backends.end() || backendIt->second != backend) return; @@ -56,16 +56,16 @@ void AuthManager::unregisterBackend(boost::shared_ptr<AuthBackend> backend) { backends.erase(backendIt); } -std::set<std::string> AuthManager::getMethods() { +const std::set<Core::String>& AuthManager::getMethods() { boost::shared_lock<boost::shared_mutex> lock(mutex); return methods; } -std::vector<std::string> AuthManager::getSubMethods(const std::string &method) throw(Core::Exception) { +std::vector<Core::String> AuthManager::getSubMethods(const Core::String &method) throw(Core::Exception) { boost::shared_lock<boost::shared_mutex> lock(mutex); - std::map<std::string, boost::shared_ptr<AuthBackend> >::iterator backend = backends.find(method); + std::map<Core::String, boost::shared_ptr<AuthBackend> >::iterator backend = backends.find(method); if(backend == backends.end()) throw Core::Exception(Core::Exception::NOT_IMPLEMENTED); @@ -75,9 +75,10 @@ std::vector<std::string> AuthManager::getSubMethods(const std::string &method) t return backend->second->getSubMethods(provider); } -boost::shared_ptr<AuthContext> AuthManager::authenticate(const std::string &method, const std::string &subMethod, const std::string &user, - const std::vector<boost::uint8_t> &data, std::vector<boost::uint8_t> &response, boost::shared_ptr<AuthContext> context) throw(Core::Exception) { - std::map<std::string, boost::shared_ptr<AuthBackend> >::iterator backend; +boost::shared_ptr<AuthContext> AuthManager::authenticate(const Core::String &method, const Core::String &subMethod, + const Core::String &user, const std::vector<boost::uint8_t> &data, std::vector<boost::uint8_t> &response, + boost::shared_ptr<AuthContext> context) throw(Core::Exception) { + std::map<Core::String, boost::shared_ptr<AuthBackend> >::iterator backend; { boost::lock_guard<boost::shared_mutex> lock(mutex); |