summaryrefslogtreecommitdiffstats
path: root/src/modules/AuthBackendChallengeResponse/Module.h
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/AuthBackendChallengeResponse/Module.h
parent82ef58fb3d0bdf6ce7d13f42cca30d03b24973c6 (diff)
downloadmad-96b69222fa0c22d0eaefaae291e78913b2ae13e9.tar
mad-96b69222fa0c22d0eaefaae291e78913b2ae13e9.zip
AuthBackendChallengeResponse hinzugefügt
Diffstat (limited to 'src/modules/AuthBackendChallengeResponse/Module.h')
-rw-r--r--src/modules/AuthBackendChallengeResponse/Module.h52
1 files changed, 52 insertions, 0 deletions
diff --git a/src/modules/AuthBackendChallengeResponse/Module.h b/src/modules/AuthBackendChallengeResponse/Module.h
new file mode 100644
index 0000000..7a5891b
--- /dev/null
+++ b/src/modules/AuthBackendChallengeResponse/Module.h
@@ -0,0 +1,52 @@
+/*
+ * Module.h
+ *
+ * Copyright (C) 2009 Matthias Schiffer <matthias@gamezock.de>
+ *
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef MAD_MODULES_AUTHBACKENDCHALLENGERESPONSE_MODULE_H_
+#define MAD_MODULES_AUTHBACKENDCHALLENGERESPONSE_MODULE_H_
+
+#include "AuthBackendChallengeResponse.h"
+
+#include <Common/Module.h>
+#include <Common/AuthManager.h>
+
+namespace Mad {
+namespace Modules {
+namespace AuthBackendChallengeResponse {
+
+class Module : public Common::Module {
+ private:
+ Common::Application *application;
+
+ boost::shared_ptr<AuthBackendChallengeResponse> backend;
+
+ public:
+ Module(Common::Application *application0) : application(application0), backend(new AuthBackendChallengeResponse(application)) {
+ application->getAuthManager()->registerBackend(backend);
+ }
+
+ virtual ~Module() {
+ application->getAuthManager()->unregisterBackend(backend);
+ }
+};
+
+}
+}
+}
+
+#endif /* MAD_MODULES_AUTHBACKENDCHALLENGERESPONSE_MODULE_H_ */