summaryrefslogtreecommitdiffstats
path: root/src/Common/AuthBackend.h
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2009-08-23 20:57:00 +0200
committerMatthias Schiffer <matthias@gamezock.de>2009-08-23 20:57:00 +0200
commit415cd36477e152c12f91a10ad61bb719373cd9d1 (patch)
tree0c235f3b1f9b844313e81eb9e900fa2662ebefcc /src/Common/AuthBackend.h
parent6666bbf908b3f2a61a9ec1959e975de54dc23b0d (diff)
downloadmad-415cd36477e152c12f91a10ad61bb719373cd9d1.tar
mad-415cd36477e152c12f91a10ad61bb719373cd9d1.zip
Authentifikation hinzugefügt.
Diffstat (limited to 'src/Common/AuthBackend.h')
-rw-r--r--src/Common/AuthBackend.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/src/Common/AuthBackend.h b/src/Common/AuthBackend.h
new file mode 100644
index 0000000..e933856
--- /dev/null
+++ b/src/Common/AuthBackend.h
@@ -0,0 +1,53 @@
+/*
+ * AuthBackend.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_COMMON_AUTHBACKEND_H_
+#define MAD_COMMON_AUTHBACKEND_H_
+
+#include <Core/Exception.h>
+
+#include <vector>
+
+#include <boost/cstdint.hpp>
+#include <boost/shared_ptr.hpp>
+
+namespace Mad {
+namespace Common {
+
+class AuthContext;
+class AuthManager;
+
+class AuthBackend {
+ protected:
+ friend class AuthManager;
+
+ virtual const std::vector<std::string>& getMethods() const = 0;
+
+ virtual boost::shared_ptr<AuthContext> authenticate(const std::string& /*method*/, const std::string& /*user*/,
+ const std::vector<boost::uint8_t>& /*challenge*/, std::vector<boost::uint8_t>& /*response*/,
+ boost::shared_ptr<AuthContext> /*context*/) throw(Core::Exception) = 0;
+
+ public:
+ virtual ~AuthBackend() {}
+};
+
+}
+}
+
+#endif /* MAD_COMMON_AUTHBACKEND_H_ */