From b40ba0cf91603b695f1f2380cbd39966a458f22f Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sun, 27 Sep 2009 19:58:24 +0200 Subject: Use Unicode-aware String class instead of std::string --- src/modules/AuthBackendPassword/AuthBackendPassword.cpp | 8 ++++---- src/modules/AuthBackendPassword/AuthBackendPassword.h | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'src/modules/AuthBackendPassword') diff --git a/src/modules/AuthBackendPassword/AuthBackendPassword.cpp b/src/modules/AuthBackendPassword/AuthBackendPassword.cpp index 1b38002..9701f04 100644 --- a/src/modules/AuthBackendPassword/AuthBackendPassword.cpp +++ b/src/modules/AuthBackendPassword/AuthBackendPassword.cpp @@ -23,15 +23,15 @@ namespace Mad { namespace Modules { namespace AuthBackendPassword { -const std::string AuthBackendPassword::methodName = "Password"; +const Core::String AuthBackendPassword::methodName = "Password"; -boost::shared_ptr AuthBackendPassword::authenticate(boost::shared_ptr provider, const std::string &subMethod, - const std::string &user, const std::vector &data, std::vector& /*response*/, +boost::shared_ptr AuthBackendPassword::authenticate(boost::shared_ptr provider, const Core::String &subMethod, + const Core::String &user, const std::vector &data, std::vector& /*response*/, boost::shared_ptr context) throw(Core::Exception) { if(context && dynamic_cast(context.get()) == 0) throw(Core::Exception(Core::Exception::INVALID_INPUT)); - std::vector allowedMethods = getSubMethods(provider); + std::vector allowedMethods = getSubMethods(provider); if(std::find(allowedMethods.begin(), allowedMethods.end(), subMethod) == allowedMethods.end()) throw(Core::Exception(Core::Exception::INVALID_INPUT)); diff --git a/src/modules/AuthBackendPassword/AuthBackendPassword.h b/src/modules/AuthBackendPassword/AuthBackendPassword.h index ac100c1..aed11e8 100644 --- a/src/modules/AuthBackendPassword/AuthBackendPassword.h +++ b/src/modules/AuthBackendPassword/AuthBackendPassword.h @@ -42,22 +42,22 @@ class MAD_MODULE_EXPORT AuthBackendPassword : public Common::AuthBackend, privat Common::Application *application; - static const std::string methodName; + static const Core::String methodName; protected: - virtual const std::string& getMethodName() const { + virtual const Core::String& getMethodName() const { return methodName; } - virtual std::vector getSubMethods(boost::shared_ptr provider) const { - std::vector ret; + virtual std::vector getSubMethods(boost::shared_ptr provider) const { + std::vector ret; ret.push_back(provider->getHashes().front()); return ret; } - virtual boost::shared_ptr authenticate(boost::shared_ptr provider, const std::string &subMethod, - const std::string &user, const std::vector &data, std::vector &response, + virtual boost::shared_ptr authenticate(boost::shared_ptr provider, const Core::String &subMethod, + const Core::String &user, const std::vector &data, std::vector &response, boost::shared_ptr context) throw(Core::Exception); public: -- cgit v1.2.3