From 96b69222fa0c22d0eaefaae291e78913b2ae13e9 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Thu, 27 Aug 2009 18:39:44 +0200 Subject: =?UTF-8?q?AuthBackendChallengeResponse=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/AuthBackendPassword/AuthBackendPassword.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/modules/AuthBackendPassword') diff --git a/src/modules/AuthBackendPassword/AuthBackendPassword.cpp b/src/modules/AuthBackendPassword/AuthBackendPassword.cpp index 7e5aca9..1b38002 100644 --- a/src/modules/AuthBackendPassword/AuthBackendPassword.cpp +++ b/src/modules/AuthBackendPassword/AuthBackendPassword.cpp @@ -28,14 +28,14 @@ const std::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 context) throw(Core::Exception) { - if(context.get() != 0 && dynamic_cast(context.get()) == 0) + if(context && dynamic_cast(context.get()) == 0) throw(Core::Exception(Core::Exception::INVALID_INPUT)); std::vector allowedMethods = getSubMethods(provider); if(std::find(allowedMethods.begin(), allowedMethods.end(), subMethod) == allowedMethods.end()) throw(Core::Exception(Core::Exception::INVALID_INPUT)); - if(context.get() == 0) + if(!context) context.reset(new AuthContextPassword); if(!provider->checkPassword(user, data, subMethod)) -- cgit v1.2.3