summaryrefslogtreecommitdiffstats
path: root/src/modules/AuthBackendPassword
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2009-08-27 18:39:44 +0200
committerMatthias Schiffer <matthias@gamezock.de>2009-08-27 18:39:44 +0200
commit96b69222fa0c22d0eaefaae291e78913b2ae13e9 (patch)
tree335a7f4706db8c4fa71eea0f250215565dd17aea /src/modules/AuthBackendPassword
parent82ef58fb3d0bdf6ce7d13f42cca30d03b24973c6 (diff)
downloadmad-96b69222fa0c22d0eaefaae291e78913b2ae13e9.tar
mad-96b69222fa0c22d0eaefaae291e78913b2ae13e9.zip
AuthBackendChallengeResponse hinzugefügt
Diffstat (limited to 'src/modules/AuthBackendPassword')
-rw-r--r--src/modules/AuthBackendPassword/AuthBackendPassword.cpp4
1 files changed, 2 insertions, 2 deletions
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<Common::AuthContext> AuthBackendPassword::authenticate(boost::shared_ptr<Common::AuthProvider> provider, const std::string &subMethod,
const std::string &user, const std::vector<boost::uint8_t> &data, std::vector<boost::uint8_t>& /*response*/,
boost::shared_ptr<Common::AuthContext> context) throw(Core::Exception) {
- if(context.get() != 0 && dynamic_cast<AuthContextPassword*>(context.get()) == 0)
+ if(context && dynamic_cast<AuthContextPassword*>(context.get()) == 0)
throw(Core::Exception(Core::Exception::INVALID_INPUT));
std::vector<std::string> 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))